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

Implement RFC 2645 (transparent enums and unions) #60463

Merged
merged 1 commit into from Jun 11, 2019

Conversation

Projects
None yet
6 participants
@mjbshaw
Copy link
Contributor

commented May 2, 2019

Tracking issue: #60405

@rust-highfive

This comment has been minimized.

Copy link
Collaborator

commented May 2, 2019

Some changes occurred in diagnostic error codes

cc @GuillaumeGomez

@highfive: run-doc-ui f0ce9c0

@rust-highfive

This comment has been minimized.

Copy link
Collaborator

commented May 2, 2019

r? @varkor

(rust_highfive has picked a reviewer for you, use r? to override)

@Centril

This comment has been minimized.

Copy link
Member

commented May 2, 2019

@bors

This comment has been minimized.

Copy link
Contributor

commented May 3, 2019

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

@rust-highfive

This comment has been minimized.

Copy link
Collaborator

commented May 6, 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:00a52fc4:start=1557163874451868760,finish=1557163964040361169,duration=89588492409
$ 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
$ export GCP_CACHE_BUCKET=rust-lang-ci-cache
$ export AWS_ACCESS_KEY_ID=AKIA46X5W6CZEJZ6XT55
---

[00:03:58] travis_fold:start:tidy
travis_time:start:tidy
tidy check
[00:03:59] tidy error: duplicate error code: 726
[00:03:59] tidy error: /checkout/src/librustc_typeck/error_codes.rs:4650: E0726: r##"
[00:03:59] tidy error: /checkout/src/librustc/error_codes.rs:2207:     E0726, // non-explicit (not `'_`) elided lifetime in unsupported position
[00:04:04] some tidy checks failed
[00:04:04] 
[00:04:04] 
[00:04:04] command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/tidy" "/checkout/src" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "--no-vendor" "--quiet"
[00:04:04] 
[00:04:04] 
[00:04:04] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test src/tools/tidy
[00:04:04] Build completed unsuccessfully in 0:01:09
[00:04:04] Build completed unsuccessfully in 0:01:09
[00:04:04] Makefile:67: recipe for target 'tidy' failed
[00:04:04] make: *** [tidy] Error 1
The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:03720c39
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
Mon May  6 17:36:57 UTC 2019
---
travis_time:end:361ce42c:start=1557164218411705878,finish=1557164218416539285,duration=4833407
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:0234e394
$ 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:03532802
travis_time:start:03532802
$ 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:18d19b34
$ 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
Copy link
Member

left a comment

This looks mostly good. Just a few comments.

Show resolved Hide resolved src/librustc/hir/check_attr.rs Outdated
Show resolved Hide resolved src/librustc_lint/types.rs Outdated
Show resolved Hide resolved src/librustc_lint/types.rs Outdated
Show resolved Hide resolved src/librustc_lint/types.rs
Show resolved Hide resolved src/librustc_typeck/check/mod.rs Outdated
Show resolved Hide resolved src/librustc_typeck/check/mod.rs Outdated
Show resolved Hide resolved src/librustc_lint/types.rs Outdated
Show resolved Hide resolved src/librustc_lint/types.rs Outdated
@rust-highfive

This comment has been minimized.

Copy link
Collaborator

commented May 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.
default ruby version
ruby 2.5.3p105 (2018-10-18 revision 65156) [x86_64-linux]
travis_fold:end:system_info

travis_fold:start:docker_mtu
travis_fold:end:docker_mtu
Installing APT Packages
travis_time:start:30941c30
$ travis_apt_get_update
travis_time:end:30941c30:start=1557250439688640480,finish=1557250449999239746,duration=10310599266
---
travis_time:end:00e4c404:start=1557250463690261842,finish=1557250898415990255,duration=434725728413
$ 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
$ export GCP_CACHE_BUCKET=rust-lang-ci-cache
$ export AWS_ACCESS_KEY_ID=AKIA46X5W6CZEJZ6XT55
---

[00:04:03] travis_fold:start:tidy
travis_time:start:tidy
tidy check
[00:04:03] tidy error: /checkout/src/librustc_lint/types.rs:643: line longer than 100 chars
[00:04:04] tidy error: duplicate error code: 726
[00:04:04] tidy error: /checkout/src/librustc_typeck/error_codes.rs:4650: E0726: r##"
[00:04:04] tidy error: /checkout/src/librustc/error_codes.rs:2207:     E0726, // non-explicit (not `'_`) elided lifetime in unsupported position
[00:04:08] some tidy checks failed
[00:04:08] 
[00:04:08] 
[00:04:08] command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/tidy" "/checkout/src" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "--no-vendor" "--quiet"
[00:04:08] 
[00:04:08] 
[00:04:08] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test src/tools/tidy
[00:04:08] Build completed unsuccessfully in 0:01:05
[00:04:08] Build completed unsuccessfully in 0:01:05
[00:04:08] Makefile:67: recipe for target 'tidy' failed
[00:04:08] make: *** [tidy] Error 1
The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:002bba38
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
Tue May  7 17:45:56 UTC 2019
---
travis_time:end:0e41c1c4:start=1557251157203704353,finish=1557251157208425089,duration=4720736
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:09363aa4
$ 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:0fbf3f7d
travis_time:start:0fbf3f7d
$ 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:0b44673e
$ 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)

@rust-highfive

This comment has been minimized.

Copy link
Collaborator

commented May 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:18865068:start=1557253256465536297,finish=1557253343487733333,duration=87022197036
$ 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
$ export GCP_CACHE_BUCKET=rust-lang-ci-cache
$ export AWS_ACCESS_KEY_ID=AKIA46X5W6CZEJZ6XT55
---
travis_time:start:test_assembly
Check compiletest suite=assembly mode=assembly (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
[01:19:58] 
[01:19:58] running 9 tests
[01:19:58] iiiiiiiii
[01:19:58] 
[01:19:58]  finished in 0.153
[01:19:58] travis_fold:end:test_assembly

---
travis_time:start:test_debuginfo
Check compiletest suite=debuginfo mode=debuginfo-both (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
[01:20:14] 
[01:20:14] running 122 tests
[01:20:39] .iiiii...i.....i..i...i..i.i.i..i.ii..i.i.....i..i....i..........iiii..........i...ii...i.......ii.i 100/122
[01:20:43] .i.i......iii.i.....ii
[01:20:43] 
[01:20:43]  finished in 29.676
[01:20:43] travis_fold:end:test_debuginfo

---
[01:44:37] ---- /checkout/src/doc/unstable-book/src/language-features/transparent-enums.md - transparent_enums (line 13) stdout ----
[01:44:37] error[E0658]: transparent enums are unstable
[01:44:37]  --> /checkout/src/doc/unstable-book/src/language-features/transparent-enums.md:18:1
[01:44:37]   |
[01:44:37] 6 | / enum Enum<'a, T> {
[01:44:37] 7 | |     Variant(T, std::marker::PhantomData<&'a u8>),
[01:44:37]   | |_^
[01:44:37]   |
[01:44:37]   = note: for more information, see https://github.com/rust-lang/rust/issues/60405
[01:44:37]   = help: add #![feature(transparent_enums)] to the crate attributes to enable
---
[01:44:37] 
[01:44:37] 
[01:44:37] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
[01:44:37] Build completed unsuccessfully in 0:36:16
[01:44:37] make: *** [check] Error 1
[01:44:37] Makefile:48: recipe for target 'check' failed
The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:05e3e078
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
Tue May  7 20:07:10 UTC 2019
---
travis_time:end:0179595c:start=1557259631929815434,finish=1557259631934347828,duration=4532394
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:21b950c8
$ 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:00e26d6e
travis_time:start:00e26d6e
$ 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:1a789da2
$ 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)

@mjbshaw

This comment has been minimized.

Copy link
Contributor Author

commented May 8, 2019

@varkor Thanks for reviewing this! I think I've addressed all the issues you raised. Let me know if there is more.

@varkor

This comment has been minimized.

Copy link
Member

commented May 10, 2019

It's looking pretty good now! I've just got a couple more small comments about the diagnostics, making sure that it reads well even in the edge cases.

@rkruppe
Copy link
Member

left a comment

Sorry for jumping in late, I agree with @varkor that this looks pretty good, but I have a few nits.

Show resolved Hide resolved src/doc/unstable-book/src/language-features/transparent-enums.md Outdated
Show resolved Hide resolved src/doc/unstable-book/src/language-features/transparent-unions.md Outdated
Show resolved Hide resolved src/librustc_lint/types.rs Outdated
Show resolved Hide resolved src/librustc_lint/types.rs
Show resolved Hide resolved src/librustc_typeck/error_codes.rs
Show resolved Hide resolved src/librustc/ty/mod.rs
Show resolved Hide resolved src/test/codegen/repr-transparent.rs

@mjbshaw mjbshaw force-pushed the mjbshaw:transparent branch from 2027e37 to 6b74ca1 May 22, 2019

@rust-highfive

This comment has been minimized.

Copy link
Collaborator

commented May 22, 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:1069f937:start=1558537456297966459,finish=1558537458669929851,duration=2371963392
$ 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
$ export GCP_CACHE_BUCKET=rust-lang-ci-cache
$ export AWS_ACCESS_KEY_ID=AKIA46X5W6CZEJZ6XT55
---

[00:04:58] travis_fold:start:tidy
travis_time:start:tidy
tidy check
[00:04:59] tidy error: /checkout/src/librustc_typeck/check/mod.rs:1860: line longer than 100 chars
[00:04:59] tidy error: duplicate error code: 727
[00:04:59] tidy error: /checkout/src/librustc_typeck/error_codes.rs:4650: E0727: r##"
[00:04:59] tidy error: /checkout/src/librustc/error_codes.rs:2208:     E0727, // `async` generators are not yet supported
[00:05:04] some tidy checks failed
[00:05:04] 
[00:05:04] 
[00:05:04] command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/tidy" "/checkout/src" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "--no-vendor" "--quiet"
[00:05:04] 
[00:05:04] 
[00:05:04] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test src/tools/tidy
[00:05:04] Build completed unsuccessfully in 0:01:15
[00:05:04] Build completed unsuccessfully in 0:01:15
[00:05:04] Makefile:67: recipe for target 'tidy' failed
[00:05:04] make: *** [tidy] Error 1
The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:16bff19e
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
Wed May 22 15:09:33 UTC 2019
---
travis_time:end:1006f348:start=1558537774008539869,finish=1558537774013193966,duration=4654097
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:0e7b20fe
$ 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:0dffa856
travis_time:start:0dffa856
$ 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:015009d0
$ 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)

@mjbshaw mjbshaw force-pushed the mjbshaw:transparent branch 2 times, most recently from afe263a to b0f8f1b May 22, 2019

@rust-highfive

This comment has been minimized.

Copy link
Collaborator

commented May 22, 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:05b0c87b:start=1558539975405021652,finish=1558539977726465227,duration=2321443575
$ 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
$ export GCP_CACHE_BUCKET=rust-lang-ci-cache
$ export AWS_ACCESS_KEY_ID=AKIA46X5W6CZEJZ6XT55
---

[00:04:36] travis_fold:start:tidy
travis_time:start:tidy
tidy check
[00:04:37] tidy error: duplicate error code: 727
[00:04:37] tidy error: /checkout/src/librustc_typeck/error_codes.rs:4650: E0727: r##"
[00:04:37] tidy error: /checkout/src/librustc/error_codes.rs:2208:     E0727, // `async` generators are not yet supported
[00:04:42] some tidy checks failed
[00:04:42] 
[00:04:42] 
[00:04:42] command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/tidy" "/checkout/src" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "--no-vendor" "--quiet"
[00:04:42] 
[00:04:42] 
[00:04:42] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test src/tools/tidy
[00:04:42] Build completed unsuccessfully in 0:01:12
[00:04:42] Build completed unsuccessfully in 0:01:12
[00:04:42] Makefile:67: recipe for target 'tidy' failed
[00:04:42] make: *** [tidy] Error 1
The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:00cd3260
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
Wed May 22 15:51:10 UTC 2019
---
travis_time:end:05fc766d:start=1558540271246115582,finish=1558540271250803029,duration=4687447
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:15d54464
$ 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:04ef9049
travis_time:start:04ef9049
$ 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:00adf57a
$ 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

commented May 23, 2019

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

@mjbshaw mjbshaw force-pushed the mjbshaw:transparent branch from b0f8f1b to c196d35 Jun 10, 2019

@rust-highfive

This comment has been minimized.

Copy link
Collaborator

commented Jun 10, 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:1c2ce40c:start=1560205785648816071,finish=1560205786514098603,duration=865282532
$ 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
$ export GCP_CACHE_BUCKET=rust-lang-ci-cache
$ export AWS_ACCESS_KEY_ID=AKIA46X5W6CZEJZ6XT55
---
[00:07:36]    Compiling rustc_errors v0.0.0 (/checkout/src/librustc_errors)
[00:07:54] error[E0425]: cannot find value `transparent_enums` in module `sym`
[00:07:54]    --> src/libsyntax/feature_gate.rs:565:14
[00:07:54]     |
[00:07:54] 565 |     (active, transparent_enums, "1.37.0", Some(60405), None),
[00:07:54]     |              ^^^^^^^^^^^^^^^^^ not found in `sym`
[00:07:54] error[E0425]: cannot find value `transparent_unions` in module `sym`
[00:07:54]    --> src/libsyntax/feature_gate.rs:568:14
[00:07:54]     |
[00:07:54]     |
[00:07:54] 568 |     (active, transparent_unions, "1.37.0", Some(60405), None),
[00:07:54]     |              ^^^^^^^^^^^^^^^^^^ not found in `sym`
[00:07:59] error: aborting due to 2 previous errors
[00:07:59] 
[00:07:59] For more information about this error, try `rustc --explain E0425`.
[00:07:59] error: Could not compile `syntax`.
---
156496 ./src/llvm-project/clang
150572 ./obj/build/bootstrap/debug/incremental
143076 ./obj/build/x86_64-unknown-linux-gnu/stage0-rustc
135300 ./obj/build/bootstrap/debug/incremental/bootstrap-oxgzobynhmm1
135296 ./obj/build/bootstrap/debug/incremental/bootstrap-oxgzobynhmm1/s-fd1oq944tb-1gzkvy5-19ca4iajxr4qm
108532 ./src/llvm-project/lldb
103496 ./.git
98060 ./obj/build/x86_64-unknown-linux-gnu/stage0-std
97584 ./src/llvm-project/clang/test

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)

@mjbshaw mjbshaw force-pushed the mjbshaw:transparent branch from c196d35 to 84b362d Jun 10, 2019

@mjbshaw mjbshaw force-pushed the mjbshaw:transparent branch from 84b362d to 9944a0b Jun 10, 2019

@rust-highfive

This comment has been minimized.

Copy link
Collaborator

commented Jun 11, 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:029ba130:start=1560208756719858608,finish=1560208757559025175,duration=839166567
$ 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
$ export GCP_CACHE_BUCKET=rust-lang-ci-cache
$ export AWS_ACCESS_KEY_ID=AKIA46X5W6CZEJZ6XT55
---
travis_time:start:test_codegen
Check compiletest suite=codegen mode=codegen (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
[01:06:28] 
[01:06:28] running 144 tests
[01:06:30] i..iii.....iii..iiii.....i......................i..i.................i.....i..........ii.i..i..i.ii. 100/144
[01:06:32] test result: ok. 114 passed; 0 failed; 30 ignored; 0 measured; 0 filtered out
[01:06:32] 
[01:06:32]  finished in 4.696
[01:06:32] travis_fold:end:test_codegen
---
travis_time:start:test_assembly
Check compiletest suite=assembly mode=assembly (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
[01:06:34] 
[01:06:34] running 9 tests
[01:06:34] iiiiiiiii
[01:06:34] 
[01:06:34]  finished in 0.153
[01:06:34] travis_fold:end:test_assembly

---
travis_time:start:test_debuginfo
Check compiletest suite=debuginfo mode=debuginfo-gdb+lldb (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
[01:06:51] 
[01:06:51] running 122 tests
[01:07:16] .iiiii...i.....i..i...i..i.i.i..i.ii..i.i.....i..i....i..........iiii..........i...ii...i.......ii.i 100/122
[01:07:21] .i.i......iii.i.....ii
[01:07:21] 
[01:07:21]  finished in 30.125
[01:07:21] travis_fold:end:test_debuginfo

---
[01:46:24] ---- /checkout/src/doc/unstable-book/src/language-features/transparent-enums.md - The_tracking_issue_for_this_feature_is_ (line 14) stdout ----
[01:46:24] error[E0658]: transparent enums are unstable
[01:46:24]  --> /checkout/src/doc/unstable-book/src/language-features/transparent-enums.md:17:1
[01:46:24]   |
[01:46:24] 5 | / enum SingleFieldEnum {
[01:46:24] 6 | |     Variant(f32)
[01:46:24]   | |_^
[01:46:24]   |
[01:46:24]   = note: for more information, see https://github.com/rust-lang/rust/issues/60405
[01:46:24]   = help: add #![feature(transparent_enums)] to the crate attributes to enable
[01:46:24]   = help: add #![feature(transparent_enums)] to the crate attributes to enable
[01:46:24] 
[01:46:24] error[E0658]: transparent enums are unstable
[01:46:24]   --> /checkout/src/doc/unstable-book/src/language-features/transparent-enums.md:23:1
[01:46:24]    |
[01:46:24] 11 | / enum MultiFieldEnum {
[01:46:24] 12 | |     Variant { field: usize, nothing: () },
[01:46:24]    | |_^
[01:46:24]    |
[01:46:24]    = note: for more information, see https://github.com/rust-lang/rust/issues/60405
[01:46:24]    = help: add #![feature(transparent_enums)] to the crate attributes to enable
---
[01:46:24] ---- /checkout/src/doc/unstable-book/src/language-features/transparent-enums.md - The_tracking_issue_for_this_feature_is_ (line 32) stdout ----
[01:46:24] error[E0658]: transparent enums are unstable
[01:46:24]   --> /checkout/src/doc/unstable-book/src/language-features/transparent-enums.md:40:1
[01:46:24]    |
[01:46:24] 10 | / pub enum BadEnum {
[01:46:24] 11 | |     Nothing(()),
[01:46:24]    | |_^
[01:46:24]    |
[01:46:24]    = note: for more information, see https://github.com/rust-lang/rust/issues/60405
[01:46:24]    = help: add #![feature(transparent_enums)] to the crate attributes to enable
[01:46:24]    = help: add #![feature(transparent_enums)] to the crate attributes to enable
[01:46:24] 
[01:46:24] error[E0690]: the variant of a transparent enum needs exactly one non-zero-sized field, but has 0
[01:46:24]   --> /checkout/src/doc/unstable-book/src/language-features/transparent-enums.md:40:1
[01:46:24]    |
[01:46:24] 10 | / pub enum BadEnum {
[01:46:24] 11 | |     Nothing(()),
[01:46:24]    | |_^
[01:46:24] 
[01:46:24] error[E0658]: transparent enums are unstable
[01:46:24]   --> /checkout/src/doc/unstable-book/src/language-features/transparent-enums.md:46:1
---
[01:46:24]  --> /checkout/src/doc/unstable-book/src/language-features/transparent-enums.md:69:1
[01:46:24]   |
[01:46:24] 4 |   #[repr(transparent)]
[01:46:24]   |   ^^^^^^^^^^^^^^^^^^^^
[01:46:24] 5 | / pub enum TooFewVariants {
[01:46:24]   | |_- zero-variant enum
[01:46:24] 
[01:46:24] error[E0658]: transparent enums are unstable
[01:46:24]  --> /checkout/src/doc/unstable-book/src/language-features/transparent-enums.md:70:1
[01:46:24]  --> /checkout/src/doc/unstable-book/src/language-features/transparent-enums.md:70:1
[01:46:24]   |
[01:46:24] 5 | / pub enum TooFewVariants {
[01:46:24]   | |_^
[01:46:24]   |
[01:46:24]   = note: for more information, see https://github.com/rust-lang/rust/issues/60405
[01:46:24]   = help: add #![feature(transparent_enums)] to the crate attributes to enable
[01:46:24]   = help: add #![feature(transparent_enums)] to the crate attributes to enable
[01:46:24] 
[01:46:24] error[E0731]: transparent enum needs exactly one variant, but has 0
[01:46:24]  --> /checkout/src/doc/unstable-book/src/language-features/transparent-enums.md:70:1
[01:46:24]   |
[01:46:24] 5 | / pub enum TooFewVariants {
[01:46:24]   | |_^
[01:46:24] 
[01:46:24] error[E0658]: transparent enums are unstable
[01:46:24]   --> /checkout/src/doc/unstable-book/src/language-features/transparent-enums.md:75:1
[01:46:24]   --> /checkout/src/doc/unstable-book/src/language-features/transparent-enums.md:75:1
[01:46:24]    |
[01:46:24] 10 | / pub enum TooManyVariants {
[01:46:24] 11 | |     First(usize),
[01:46:24] 13 | | }
[01:46:24]    | |_^
[01:46:24]    |
[01:46:24]    = note: for more information, see https://github.com/rust-lang/rust/issues/60405
[01:46:24]    = note: for more information, see https://github.com/rust-lang/rust/issues/60405
[01:46:24]    = help: add #![feature(transparent_enums)] to the crate attributes to enable
[01:46:24] 
[01:46:24] error[E0731]: transparent enum needs exactly one variant, but has 2
[01:46:24]   --> /checkout/src/doc/unstable-book/src/language-features/transparent-enums.md:75:1
[01:46:24]    |
[01:46:24] 10 | / pub enum TooManyVariants {
[01:46:24] 11 | |     First(usize),
[01:46:24] 13 | | }
[01:46:24]    | |_^
[01:46:24]    |
[01:46:24]    |
[01:46:24] note: the following variants exist on `main::TooManyVariants`
[01:46:24]    |
[01:46:24] 11 |     First(usize),
[01:46:24]    |     ^^^^^^^^^^^^
[01:46:24] 12 |     Second,
---
[01:46:24] ---- /checkout/src/doc/unstable-book/src/language-features/transparent-enums.md - The_tracking_issue_for_this_feature_is_ (line 54) stdout ----
[01:46:24] error[E0658]: transparent enums are unstable
[01:46:24]  --> /checkout/src/doc/unstable-book/src/language-features/transparent-enums.md:57:1
[01:46:24]   |
[01:46:24] 5 | / pub enum GenericEnum<T> {
[01:46:24] 6 | |     Variant(T, ()),
[01:46:24]   | |_^
[01:46:24]   |
[01:46:24]   = note: for more information, see https://github.com/rust-lang/rust/issues/60405
[01:46:24]   = help: add #![feature(transparent_enums)] to the crate attributes to enable

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)

@mjbshaw mjbshaw force-pushed the mjbshaw:transparent branch from 9944a0b to c8848ed Jun 11, 2019

@mjbshaw mjbshaw force-pushed the mjbshaw:transparent branch from c8848ed to dac1c6a Jun 11, 2019

@mjbshaw

This comment has been minimized.

Copy link
Contributor Author

commented Jun 11, 2019

@rkruppe Thanks for the review! I think I've addressed all your comments. Fingers crossed all tests pass now...

@rkruppe

This comment has been minimized.

Copy link
Member

commented Jun 11, 2019

LGTM, thanks!

@bors r=varkor,rkruppe rollup=never

(no rollup because IME thes platform-dependent codegen tests for ABIs always take several tries to get right)

@bors

This comment has been minimized.

Copy link
Contributor

commented Jun 11, 2019

📌 Commit dac1c6a has been approved by varkor,rkruppe

@bors

This comment was marked as resolved.

Copy link
Contributor

commented Jun 11, 2019

💡 This pull request was already approved, no need to approve it again.

  • There's another pull request that is currently being tested, blocking this pull request: #61673
@bors

This comment has been minimized.

Copy link
Contributor

commented Jun 11, 2019

📌 Commit dac1c6a has been approved by varkor,rkruppe

@Centril

This comment has been minimized.

Copy link
Member

commented Jun 11, 2019

@rust-highfive rust-highfive assigned rkruppe and unassigned varkor Jun 11, 2019

@bors

This comment has been minimized.

Copy link
Contributor

commented Jun 11, 2019

⌛️ Testing commit dac1c6a with merge 8e948df...

bors added a commit that referenced this pull request Jun 11, 2019

Auto merge of #60463 - mjbshaw:transparent, r=varkor,rkruppe
Implement RFC 2645 (transparent enums and unions)

Tracking issue: #60405
@bors

This comment has been minimized.

Copy link
Contributor

commented Jun 11, 2019

☀️ Test successful - checks-travis, status-appveyor
Approved by: varkor,rkruppe
Pushing 8e948df to master...

@bors bors added the merged-by-bors label Jun 11, 2019

@bors bors merged commit dac1c6a into rust-lang:master Jun 11, 2019

2 checks passed

Travis CI - Pull Request Build Passed
Details
homu Test successful
Details
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.