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

Merge `ast::Mutability` and `mir::Mutability` #67355

Merged
merged 3 commits into from Dec 21, 2019
Merged

Conversation

@Centril
Copy link
Member

Centril commented Dec 16, 2019

@rust-highfive

This comment was marked as resolved.

Copy link
Collaborator

rust-highfive commented Dec 16, 2019

The job x86_64-gnu-llvm-7 of your PR failed (pretty log, 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.
2019-12-16T16:40:00.0162892Z ##[command]git remote add origin https://github.com/rust-lang/rust
2019-12-16T16:40:00.0176188Z ##[command]git config gc.auto 0
2019-12-16T16:40:00.0179105Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2019-12-16T16:40:00.0182865Z ##[command]git config --get-all http.proxy
2019-12-16T16:40:00.0186428Z ##[command]git -c http.extraheader="AUTHORIZATION: basic ***" fetch --force --tags --prune --progress --no-recurse-submodules --depth=2 origin +refs/heads/*:refs/remotes/origin/* +refs/pull/67355/merge:refs/remotes/pull/67355/merge
---
2019-12-16T17:30:35.0212399Z .................................................................................................... 1600/9380
2019-12-16T17:30:38.7904750Z .................................................................................................... 1700/9380
2019-12-16T17:30:48.9909667Z ...................................................................i................................ 1800/9380
2019-12-16T17:30:55.5465300Z .................................................................................................... 1900/9380
2019-12-16T17:31:07.9739534Z ....................................................iiiii........................................... 2000/9380
2019-12-16T17:31:16.7361138Z .................................................................................................... 2200/9380
2019-12-16T17:31:18.8025830Z .................................................................................................... 2300/9380
2019-12-16T17:31:21.5684430Z .................................................................................................... 2400/9380
2019-12-16T17:31:40.5470895Z .................................................................................................... 2500/9380
---
2019-12-16T17:33:53.0017676Z .............................................................i...............i...................... 4800/9380
2019-12-16T17:33:59.3487648Z .................................................................................................... 4900/9380
2019-12-16T17:34:06.8265329Z .................................................................................................... 5000/9380
2019-12-16T17:34:11.5153271Z .....i.............................................................................................. 5100/9380
2019-12-16T17:34:20.8444057Z .......................................................................ii.ii...........i............ 5200/9380
2019-12-16T17:34:28.6784618Z .......i............................................................................................ 5400/9380
2019-12-16T17:34:37.5371993Z .................................................................................................... 5500/9380
2019-12-16T17:34:43.3738456Z .....................................................i.............................................. 5600/9380
2019-12-16T17:34:49.6050348Z .................................................................................................... 5700/9380
2019-12-16T17:34:49.6050348Z .................................................................................................... 5700/9380
2019-12-16T17:34:58.2493158Z .................................................................................................... 5800/9380
2019-12-16T17:35:04.5954821Z .........................................ii...i..ii...........i..................................... 5900/9380
2019-12-16T17:35:23.7846141Z .................................................................................................... 6100/9380
2019-12-16T17:35:30.8234584Z .................................................................................................... 6200/9380
2019-12-16T17:35:30.8234584Z .................................................................................................... 6200/9380
2019-12-16T17:35:37.7050072Z ..................................................................i..ii............................. 6300/9380
2019-12-16T17:36:01.7309044Z .................................................................................................... 6500/9380
2019-12-16T17:36:03.4905973Z ......................................i............................................................. 6600/9380
2019-12-16T17:36:05.3759681Z .................................................................................................... 6700/9380
2019-12-16T17:36:07.5217558Z ..............................i..................................................................... 6800/9380
---
2019-12-16T17:37:30.4523213Z .................................................................................................... 7400/9380
2019-12-16T17:37:34.5143761Z .................................................................................................... 7500/9380
2019-12-16T17:37:39.2635002Z .................................................................................................... 7600/9380
2019-12-16T17:37:47.0584819Z .................................................................................................... 7700/9380
2019-12-16T17:37:54.4855708Z ....................................................iiii............................................ 7800/9380
2019-12-16T17:38:06.8562143Z .................................................................................................... 8000/9380
2019-12-16T17:38:12.3950279Z .................................................................................................... 8100/9380
2019-12-16T17:38:26.4541027Z .................................................................................................... 8200/9380
2019-12-16T17:38:33.3939334Z .................................................................................................... 8300/9380
---
2019-12-16T17:40:35.7555067Z  finished in 5.411
2019-12-16T17:40:35.7726865Z Check compiletest suite=codegen mode=codegen (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2019-12-16T17:40:35.9517572Z 
2019-12-16T17:40:35.9518263Z running 166 tests
2019-12-16T17:40:38.5104313Z iiii......i........ii..iiii...i.............................i..i..................i....i............ 100/166
2019-12-16T17:40:40.2829000Z i.i.i...iii..iiiiiii.......................iii............ii......
2019-12-16T17:40:40.2829639Z 
2019-12-16T17:40:40.2835278Z  finished in 4.511
2019-12-16T17:40:40.3005439Z Check compiletest suite=codegen-units mode=codegen-units (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2019-12-16T17:40:40.4362521Z 
---
2019-12-16T17:40:42.1302872Z  finished in 1.829
2019-12-16T17:40:42.1465128Z Check compiletest suite=assembly mode=assembly (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2019-12-16T17:40:42.2868254Z 
2019-12-16T17:40:42.2868676Z running 9 tests
2019-12-16T17:40:42.2869626Z iiiiiiiii
2019-12-16T17:40:42.2869976Z 
2019-12-16T17:40:42.2870038Z  finished in 0.140
2019-12-16T17:40:42.3043428Z Check compiletest suite=incremental mode=incremental (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2019-12-16T17:40:42.4675532Z 
---
2019-12-16T17:40:58.6217647Z  finished in 16.318
2019-12-16T17:40:58.6421486Z Check compiletest suite=debuginfo mode=debuginfo-gdb+lldb (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2019-12-16T17:40:58.7979559Z 
2019-12-16T17:40:58.7980707Z running 124 tests
2019-12-16T17:41:19.5632442Z .iiiii..ii.....i..i...i..i.i.i..i..i..iii....ii.ii....ii..........iiii..........i.....i..ii.......ii 100/124
2019-12-16T17:41:23.2014509Z .i.iii.....iiiiii.....ii
2019-12-16T17:41:23.2015020Z 
2019-12-16T17:41:23.2019101Z  finished in 24.559
2019-12-16T17:41:23.2026058Z Uplifting stage1 rustc (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2019-12-16T17:41:23.2026866Z Copying stage2 rustc from stage1 (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu / x86_64-unknown-linux-gnu)
---
2019-12-16T17:41:49.6183131Z ---- [ui] ui-fulldeps/pprust-expr-roundtrip.rs stdout ----
2019-12-16T17:41:49.6183330Z 
2019-12-16T17:41:49.6183661Z error: test compilation failed although it shouldn't!
2019-12-16T17:41:49.6183853Z status: exit code: 1
2019-12-16T17:41:49.6184577Z command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui-fulldeps/pprust-expr-roundtrip.rs" "-Zthreads=1" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui-fulldeps/pprust-expr-roundtrip/a" "-Crpath" "-O" "-Cdebuginfo=0" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui-fulldeps/pprust-expr-roundtrip/auxiliary"
2019-12-16T17:41:49.6185306Z ------------------------------------------
2019-12-16T17:41:49.6185461Z 
2019-12-16T17:41:49.6185756Z ------------------------------------------
2019-12-16T17:41:49.6185901Z stderr:
2019-12-16T17:41:49.6185901Z stderr:
2019-12-16T17:41:49.6186193Z ------------------------------------------
2019-12-16T17:41:49.6186349Z error[E0599]: no variant or associated item named `Immutable` found for type `syntax::ast::Mutability` in the current scope
2019-12-16T17:41:49.6186659Z   --> /checkout/src/test/ui-fulldeps/pprust-expr-roundtrip.rs:144:78
2019-12-16T17:41:49.6186830Z    |
2019-12-16T17:41:49.6186958Z LL |                     &mut |e| g(ExprKind::AddrOf(BorrowKind::Ref, Mutability::Immutable, e)),
2019-12-16T17:41:49.6187239Z 
2019-12-16T17:41:49.6187366Z error: aborting due to previous error
2019-12-16T17:41:49.6187486Z 
2019-12-16T17:41:49.6187790Z For more information about this error, try `rustc --explain E0599`.
---
2019-12-16T17:41:49.6189428Z test result: FAILED. 64 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out
2019-12-16T17:41:49.6189562Z 
2019-12-16T17:41:49.6189726Z 
2019-12-16T17:41:49.6189829Z 
2019-12-16T17:41:49.6191185Z command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/compiletest" "--compile-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib" "--run-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib" "--rustc-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "--src-base" "/checkout/src/test/ui-fulldeps" "--build-base" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui-fulldeps" "--stage-id" "stage2-x86_64-unknown-linux-gnu" "--mode" "ui" "--target" "x86_64-unknown-linux-gnu" "--host" "x86_64-unknown-linux-gnu" "--llvm-filecheck" "/usr/lib/llvm-7/bin/FileCheck" "--host-rustcflags" "-Crpath -O -Cdebuginfo=0 -Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--target-rustcflags" "-Crpath -O -Cdebuginfo=0 -Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--docck-python" "/usr/bin/python2.7" "--lldb-python" "/usr/bin/python2.7" "--gdb" "/usr/bin/gdb" "--quiet" "--llvm-version" "7.0.0\n" "--system-llvm" "--cc" "" "--cxx" "" "--cflags" "" "--llvm-components" "" "--llvm-cxxflags" "" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" "" "--color" "always"
2019-12-16T17:41:49.6191573Z 
2019-12-16T17:41:49.6191696Z 
2019-12-16T17:41:49.6191902Z failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
2019-12-16T17:41:49.6192051Z Build completed unsuccessfully in 0:56:19
2019-12-16T17:41:49.6192051Z Build completed unsuccessfully in 0:56:19
2019-12-16T17:41:49.6224996Z == clock drift check ==
2019-12-16T17:41:49.6239999Z   local time: Mon Dec 16 17:41:49 UTC 2019
2019-12-16T17:41:49.8973320Z   network time: Mon, 16 Dec 2019 17:41:49 GMT
2019-12-16T17:41:49.8973548Z == end clock drift check ==
2019-12-16T17:41:51.3976993Z 
2019-12-16T17:41:51.4070437Z ##[error]Bash exited with code '1'.
2019-12-16T17:41:51.4109201Z ##[section]Starting: Checkout
2019-12-16T17:41:51.4110661Z ==============================================================================
2019-12-16T17:41:51.4110703Z Task         : Get sources
2019-12-16T17:41:51.4110755Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.

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)

@Centril Centril force-pushed the Centril:merge-mut branch from 47cd9e5 to 97f65f8 Dec 16, 2019
@Centril Centril added the S-blocked label Dec 16, 2019
@Centril

This comment has been minimized.

Copy link
Member Author

Centril commented Dec 16, 2019

N.B. This will break Clippy so merging should wait a bit.

@Centril Centril closed this Dec 18, 2019
@Centril Centril reopened this Dec 18, 2019
src/librustc_lint/unused.rs Outdated Show resolved Hide resolved
@@ -2101,8 +2101,8 @@ impl Clean<Item> for doctree::Constant<'_> {
impl Clean<Mutability> for hir::Mutability {
fn clean(&self, _: &DocContext<'_>) -> Mutability {
match self {
&hir::Mutability::Mutable => Mutable,

This comment has been minimized.

Copy link
@oli-obk

oli-obk Dec 20, 2019

Contributor

why has rustdoc its own mutability enum?

This comment has been minimized.

Copy link
@Centril

Centril Dec 20, 2019

Author Member

Something rustdoc-wants-to-be-more-independent something something, cc @GuillaumeGomez

This comment has been minimized.

Copy link
@GuillaumeGomez

GuillaumeGomez Dec 20, 2019

Member

We do it for all hir types. If it can be removed, everyone will be happy though. ;)

This comment has been minimized.

Copy link
@Centril

Centril Dec 20, 2019

Author Member

Don't see why it couldn't be removed; should be quite easy.

This comment has been minimized.

Copy link
@GuillaumeGomez

GuillaumeGomez Dec 21, 2019

Member

I didn't look (and still haven't) so I don't know if it's possible or not. The idea behind clean rustdoc types is to provide a type with direct access to what rustdoc needs. If the rustdoc type doesn't provide anything more than the original, then it can (and should) be removed. Might be worth opening an issue about this.

@@ -1083,7 +1083,7 @@ impl<'a> State<'a> {
}
ast::ForeignItemKind::Static(ref t, m) => {
self.head(visibility_qualified(&item.vis, "static"));
if m == ast::Mutability::Mutable {
if m == ast::Mutability::Mut {

This comment has been minimized.

Copy link
@oli-obk

oli-obk Dec 20, 2019

Contributor

all these comparisons make me wonder if we should have is_mut() and is_immut() helper methods

This comment has been minimized.

Copy link
@Centril

Centril Dec 20, 2019

Author Member

I would suggest just nixing PartialEq by using the beautiful if let instead.

@oli-obk

This comment has been minimized.

Copy link
Contributor

oli-obk commented Dec 20, 2019

@bors r+

@rust-lang/clippy (trivial) but a lot of breakage incoming

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Dec 20, 2019

📌 Commit 9fa6f34 has been approved by oli-obk

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Dec 20, 2019

🌲 The tree is currently closed for pull requests below priority 100, this pull request will be tested once the tree is reopened

@bors

This comment was marked as resolved.

Copy link
Contributor

bors commented Dec 20, 2019

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

@Centril Centril force-pushed the Centril:merge-mut branch from 9fa6f34 to 6d7c6d7 Dec 20, 2019
@Centril

This comment has been minimized.

Copy link
Member Author

Centril commented Dec 20, 2019

@bors r=oli-obk

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Dec 20, 2019

📌 Commit 6d7c6d7 has been approved by oli-obk

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Dec 20, 2019

🌲 The tree is currently closed for pull requests below priority 100, this pull request will be tested once the tree is reopened

Centril added a commit to Centril/rust that referenced this pull request Dec 21, 2019
Merge `ast::Mutability` and `mir::Mutability`

r? @oli-obk
bors added a commit that referenced this pull request Dec 21, 2019
Rollup of 7 pull requests

Successful merges:

 - #67059 (Fix too restrictive checks on Drop impls)
 - #67355 (Merge `ast::Mutability` and `mir::Mutability`)
 - #67393 (Enable opting out of specific default LLVM arguments.)
 - #67422 (Cleanup err codes)
 - #67462 (Make ptr::slice_from_raw_parts a const fn available under a feature flag)
 - #67467 (Test slice patterns more)
 - #67478 (Fix src/libcore/str/mod.rs doc comments)

Failed merges:

r? @ghost
@bors bors merged commit 6d7c6d7 into rust-lang:master Dec 21, 2019
4 checks passed
4 checks passed
pr Build #20191220.30 succeeded
Details
pr (Linux mingw-check) Linux mingw-check succeeded
Details
pr (Linux x86_64-gnu-llvm-7) Linux x86_64-gnu-llvm-7 succeeded
Details
pr (Linux x86_64-gnu-tools) Linux x86_64-gnu-tools succeeded
Details
@Centril Centril deleted the Centril:merge-mut branch Dec 21, 2019
bors added a commit to rust-lang/rust-clippy that referenced this pull request Dec 21, 2019
rustup "Merge `ast::Mutability` and `mir::Mutability`"

cc rust-lang/rust#67355
changelog: none
bors added a commit to rust-lang/rust-clippy that referenced this pull request Dec 21, 2019
rustup "Merge `ast::Mutability` and `mir::Mutability`"

cc rust-lang/rust#67355
changelog: none
calebcartwright added a commit to calebcartwright/rustfmt that referenced this pull request Jan 16, 2020
`Mutability` variants were renamed to `Not` and `Mut`
rust-lang/rust#67355
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.