Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add const generics to the AST #58191

Merged
merged 28 commits into from Feb 8, 2019

Conversation

Projects
None yet
7 participants
@varkor
Copy link
Member

varkor commented Feb 5, 2019

This is mostly split out from #53645 in an effort to make progress merging const generics piecewise instead of in one go. This work is a collaborative effort with @yodaldevoid.

cc @petrochenkov

r? @eddyb

Show resolved Hide resolved src/librustc_save_analysis/sig.rs Outdated
@eddyb

This comment has been minimized.

Copy link
Member

eddyb commented Feb 5, 2019

r? @petrochenkov (r=me after all concerns are dealt with)

@rust-highfive rust-highfive assigned petrochenkov and unassigned eddyb Feb 5, 2019

@rust-highfive

This comment was marked as resolved.

Copy link
Collaborator

rust-highfive commented Feb 5, 2019

The job x86_64-gnu-llvm-6.0 of your PR failed on Travis (raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
travis_time:end:1204b4f8:start=1549389709507030940,finish=1549389711806624270,duration=2299593330
$ git checkout -qf FETCH_HEAD
travis_fold:end:git.checkout

Encrypted environment variables have been removed for security reasons.
See https://docs.travis-ci.com/user/pull-requests/#pull-requests-and-security-restrictions
$ export SCCACHE_BUCKET=rust-lang-ci-sccache2
$ export SCCACHE_REGION=us-west-1
Setting environment variables from .travis.yml
$ export IMAGE=x86_64-gnu-llvm-6.0
---
[00:21:02]    Compiling rustc_save_analysis v0.0.0 (/checkout/src/librustc_save_analysis)
[00:21:04] error: unused variable: `ty`
[00:21:04]    --> src/librustc_save_analysis/sig.rs:657:56
[00:21:04]     |
[00:21:04] 657 |                     ast::GenericParamKind::Const { ref ty } => {
[00:21:04]     |                                                        ^^ help: try ignoring the field: `ty: _`
[00:21:04]     = note: `-D unused-variables` implied by `-D warnings`
[00:21:04] 
[00:21:04] error: aborting due to previous error
[00:21:04] 
[00:21:04] 
[00:21:04] error: Could not compile `rustc_save_analysis`.
[00:21:04] warning: build failed, waiting for other jobs to finish...
[00:21:24] error: build failed
[00:21:24] command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "build" "--target" "x86_64-unknown-linux-gnu" "-j" "4" "--release" "--locked" "--color" "always" "--features" "" "--manifest-path" "/checkout/src/rustc/Cargo.toml" "--message-format" "json"
[00:21:24] expected success, got: exit code: 101
[00:21:24] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap build
[00:21:24] Build completed unsuccessfully in 0:17:13
[00:21:24] make: *** [all] Error 1
[00:21:24] Makefile:18: recipe for target 'all' failed
The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:06762885
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
Tue Feb  5 18:23:26 UTC 2019
---
travis_time:end:1b7c164f:start=1549391007387783751,finish=1549391007392724859,duration=4941108
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:07cf7e10
$ ln -s . checkout && for CORE in obj/cores/core.*; do EXE=$(echo $CORE | sed 's|obj/cores/core\.[0-9]*\.!checkout!\(.*\)|\1|;y|!|/|'); if [ -f "$EXE" ]; then printf travis_fold":start:crashlog\n\033[31;1m%s\033[0m\n" "$CORE"; gdb --batch -q -c "$CORE" "$EXE" -iex 'set auto-load off' -iex 'dir src/' -iex 'set sysroot .' -ex bt -ex q; echo travis_fold":"end:crashlog; fi; done || true
travis_fold:end:after_failure.4
travis_fold:start:after_failure.5
travis_time:start:19e2c38e
travis_time:start:19e2c38e
$ cat ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers || true
cat: ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers: No such file or directory
travis_fold:end:after_failure.5
travis_fold:start:after_failure.6
travis_time:start:23ea4be2
$ dmesg | grep -i kill

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

@varkor varkor force-pushed the varkor:const-generics-ast branch from 25b1b35 to 2299fdb Feb 5, 2019

@rust-highfive

This comment was marked as resolved.

Copy link
Collaborator

rust-highfive commented Feb 5, 2019

The job x86_64-gnu-llvm-6.0 of your PR failed on Travis (raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
travis_time:end:01c86527:start=1549393256486997182,finish=1549393259038598355,duration=2551601173
$ git checkout -qf FETCH_HEAD
travis_fold:end:git.checkout

Encrypted environment variables have been removed for security reasons.
See https://docs.travis-ci.com/user/pull-requests/#pull-requests-and-security-restrictions
$ export SCCACHE_BUCKET=rust-lang-ci-sccache2
$ export SCCACHE_REGION=us-west-1
Setting environment variables from .travis.yml
$ export IMAGE=x86_64-gnu-llvm-6.0
---
travis_time:start:test_debuginfo
Check compiletest suite=debuginfo mode=debuginfo-both (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
[01:07:50] 
[01:07:50] running 119 tests
[01:08:15] .iiiii...i.....i..i...i..i.i..i.ii...i.....i..i....i..........iiii..........i...ii...i.......ii.i.i. 100/119
[01:08:18] i......iii.i.....ii
[01:08:18] 
[01:08:18]  finished in 28.268
[01:08:18] travis_fold:end:test_debuginfo

---
[01:33:04] ---- /checkout/obj/build/x86_64-unknown-linux-gnu/test/error-index.md - Rust_Compiler_Error_Index::E0670 (line 10979) stdout ----
[01:33:04] error[E0670]: const parameters cannot depend on type parameters
[01:33:04]  --> /checkout/obj/build/x86_64-unknown-linux-gnu/test/error-index.md:10980:25
[01:33:04]   |
[01:33:04] 3 | fn const_id<T, const N: T>() -> T {
[01:33:04]   |                         ^ const parameter depends on type parameter
[01:33:04] error[E0658]: const generics are unstable (see issue #44580)
[01:33:04]  --> /checkout/obj/build/x86_64-unknown-linux-gnu/test/error-index.md:10980:22
[01:33:04]   |
[01:33:04]   |
[01:33:04] 3 | fn const_id<T, const N: T>() -> T {
[01:33:04]   |
[01:33:04]   = help: add #![feature(const_generics)] to the crate attributes to enable
[01:33:04] 
[01:33:04] 
[01:33:04] error: const generics in any position are currently unsupported
[01:33:04]  --> /checkout/obj/build/x86_64-unknown-linux-gnu/test/error-index.md:10980:22
[01:33:04]   |
[01:33:04] 3 | fn const_id<T, const N: T>() -> T {
[01:33:04] 
[01:33:04] thread '/checkout/obj/build/x86_64-unknown-linux-gnu/test/error-index.md - Rust_Compiler_Error_Index::E0670 (line 10979)' panicked at 'couldn't compile the test', src/librustdoc/test.rs:354:13
[01:33:04] note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
[01:33:04] 
---
[01:33:04] 
[01:33:04] 
[01:33:04] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
[01:33:04] Build completed unsuccessfully in 0:36:23
[01:33:04] Makefile:48: recipe for target 'check' failed
[01:33:04] make: *** [check] Error 1
The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:03c1cd33
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
Tue Feb  5 20:34:15 UTC 2019
---
travis_time:end:168becb8:start=1549398857504507500,finish=1549398857558101526,duration=53594026
travis_fold:end:after_failure.4
travis_fold:start:after_failure.5
travis_time:start:097adbf4
$ cat ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers || true
cat: ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers: No such file or directory
travis_fold:end:after_failure.5
travis_fold:start:after_failure.6
travis_time:start:11326d9a
$ dmesg | grep -i kill

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Feb 6, 2019

☔️ The latest upstream changes (presumably #58061) made this pull request unmergeable. Please resolve the merge conflicts.

@varkor varkor force-pushed the varkor:const-generics-ast branch from 557bd4f to b534cf9 Feb 6, 2019

@petrochenkov

This comment has been minimized.

Copy link
Contributor

petrochenkov commented Feb 6, 2019

Reviewed.

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Feb 7, 2019

☔️ The latest upstream changes (presumably #58125) made this pull request unmergeable. Please resolve the merge conflicts.

@varkor varkor force-pushed the varkor:const-generics-ast branch from 9f432b6 to 8af5ccd Feb 7, 2019

@rust-highfive

This comment was marked as resolved.

Copy link
Collaborator

rust-highfive commented Feb 7, 2019

The job x86_64-gnu-llvm-6.0 of your PR failed on Travis (raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
travis_time:end:006c3798:start=1549530966916174617,finish=1549530969902762860,duration=2986588243
$ git checkout -qf FETCH_HEAD
travis_fold:end:git.checkout

Encrypted environment variables have been removed for security reasons.
See https://docs.travis-ci.com/user/pull-requests/#pull-requests-and-security-restrictions
$ export SCCACHE_BUCKET=rust-lang-ci-sccache2
$ export SCCACHE_REGION=us-west-1
Setting environment variables from .travis.yml
$ export IMAGE=x86_64-gnu-llvm-6.0
---
[00:06:48] command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "build" "--target" "x86_64-unknown-linux-gnu" "-j" "4" "--release" "--locked" "--color" "always" "--features" "" "--manifest-path" "/checkout/src/rustc/Cargo.toml" "--message-format" "json"
[00:06:48] expected success, got: exit code: 101
[00:06:48] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap build
[00:06:48] Build completed unsuccessfully in 0:02:32
[00:06:48] make: *** [all] Error 1
[00:06:48] Makefile:18: recipe for target 'all' failed
The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:00d8e130
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
Thu Feb  7 09:23:11 UTC 2019
---
travis_time:end:03c2a77a:start=1549531392444493598,finish=1549531392449966431,duration=5472833
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:0fdbbc7f
$ ln -s . checkout && for CORE in obj/cores/core.*; do EXE=$(echo $CORE | sed 's|obj/cores/core\.[0-9]*\.!checkout!\(.*\)|\1|;y|!|/|'); if [ -f "$EXE" ]; then printf travis_fold":start:crashlog\n\033[31;1m%s\033[0m\n" "$CORE"; gdb --batch -q -c "$CORE" "$EXE" -iex 'set auto-load off' -iex 'dir src/' -iex 'set sysroot .' -ex bt -ex q; echo travis_fold":"end:crashlog; fi; done || true
travis_fold:end:after_failure.4
travis_fold:start:after_failure.5
travis_time:start:1b214c2c
travis_time:start:1b214c2c
$ cat ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers || true
cat: ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

bors added a commit that referenced this pull request Feb 7, 2019

Auto merge of #58191 - varkor:const-generics-ast, r=petrochenkov
Add const generics to the AST

This is mostly split out from #53645 in an effort to make progress merging const generics piecewise instead of in one go.

cc @yodaldevoid, @petrochenkov

r? @eddyb
@bors

This comment has been minimized.

Copy link
Contributor

bors commented Feb 7, 2019

💔 Test failed - status-appveyor

@varkor

This comment has been minimized.

Copy link
Member Author

varkor commented Feb 7, 2019

The log doesn't display any information that looks like an error with this pull request, so I'm going to retry (I may have misinterpreted).

@bors retry

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Feb 8, 2019

⌛️ Testing commit f2fe71c with merge 8716dd5...

bors added a commit that referenced this pull request Feb 8, 2019

Auto merge of #58191 - varkor:const-generics-ast, r=petrochenkov
Add const generics to the AST

This is mostly split out from #53645 in an effort to make progress merging const generics piecewise instead of in one go.

cc @yodaldevoid, @petrochenkov

r? @eddyb
@bors

This comment has been minimized.

Copy link
Contributor

bors commented Feb 8, 2019

💔 Test failed - checks-travis

@rust-highfive

This comment has been minimized.

Copy link
Collaborator

rust-highfive commented Feb 8, 2019

The job dist-x86_64-apple of your PR failed on Travis (raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
[00:03:48]       Memory: 8 GB
[00:03:48]       Boot ROM Version: VMW71.00V.7581552.B64.1801142334
[00:03:48]       Apple ROM Info: [MS_VM_CERT/SHA1/27d66596a61c48dd3dc7216fd715126e33f59ae7]Welcome to the Virtual Machine
[00:03:48]       SMC Version (system): 2.8f0
[00:03:48]       Serial Number (system): VMOWGC9ivnQ3
[00:03:48] 
[00:03:48] hw.ncpu: 4
[00:03:48] hw.byteorder: 1234
[00:03:48] hw.memsize: 8589934592
---
[02:49:20] travis_time:end:stage2-cargo-miri:start=1549599597009705000,finish=1549599597664836000,duration=655131000

[02:49:20] [TIMING] ToolBuild { compiler: Compiler { stage: 2, host: "x86_64-apple-darwin" }, target: "x86_64-apple-darwin", tool: "cargo-miri", path: "src/tools/miri", mode: ToolRustc, is_optional_tool: true, source_type: Submodule, extra_features: [] } -- 0.687
[02:49:21] [TIMING] Miri { stage: 2, target: "x86_64-apple-darwin" } -- 1.412
The job exceeded the maximum time limit for jobs, and has been terminated.

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

@kennytm

This comment has been minimized.

Copy link
Member

kennytm commented Feb 8, 2019

@bors retry p=88

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Feb 8, 2019

⌛️ Testing commit f2fe71c with merge 43e04fb...

bors added a commit that referenced this pull request Feb 8, 2019

Auto merge of #58191 - varkor:const-generics-ast, r=petrochenkov
Add const generics to the AST

This is mostly split out from #53645 in an effort to make progress merging const generics piecewise instead of in one go.

cc @yodaldevoid, @petrochenkov

r? @eddyb
@bors

This comment has been minimized.

Copy link
Contributor

bors commented Feb 8, 2019

☀️ Test successful - checks-travis, status-appveyor
Approved by: petrochenkov
Pushing 43e04fb to master...

@bors bors added the merged-by-bors label Feb 8, 2019

@bors bors merged commit f2fe71c into rust-lang:master Feb 8, 2019

1 check passed

homu Test successful
Details

@varkor varkor deleted the varkor:const-generics-ast branch Feb 8, 2019

bors added a commit to rust-lang/rust-clippy that referenced this pull request Feb 9, 2019

@topecongiro topecongiro referenced this pull request Feb 11, 2019

Closed

Format const generics #3336

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.