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

Rollup of 7 pull requests #52567

Closed
wants to merge 26 commits into from
Closed

Conversation

pietroalbini
Copy link
Member

Successful merges:

Failed merges:

r? @ghost

alexcrichton and others added 26 commits July 18, 2018 11:37
This commit removes a hack in our ThinLTO passes which removes available
externally functions manually. The [upstream bug][1] has long since been fixed,
so we should be able to rely on LLVM natively for this now!

[1]: https://bugs.llvm.org/show_bug.cgi?id=35736
This commit updates the tokenization of items which are subsequently passed to
`proc_macro` to ensure that span information is preserved on attributes as much
as possible. Previously this area of the code suffered from rust-lang#43081 where we
haven't actually implemented converting an attribute to to a token tree yet, but
a local fix was possible here.

Closes rust-lang#47941
Switch a `mkdir $foo` to `mkdir -p $foo` to handle the case that this script is
being run locally and has previously executed.
Rename `shadows_glob` to `shadowed_glob`
…=nikomatsakis

rustc: Remove a workaround in ThinLTO fixed upstream

This commit removes a hack in our ThinLTO passes which removes available
externally functions manually. The [upstream bug][1] has long since been fixed,
so we should be able to rely on LLVM natively for this now!

[1]: https://bugs.llvm.org/show_bug.cgi?id=35736
Remove duplicate E0396 tests

Resolves FIXME rust-lang#13973 (erroneously marked as rust-lang#13972). A test for E0396 already exists in `test/ui/const-deref-ptr.rs`.
…akis

proc_macro: Preserve spans of attributes on functions

This commit updates the tokenization of items which are subsequently passed to
`proc_macro` to ensure that span information is preserved on attributes as much
as possible. Previously this area of the code suffered from rust-lang#43081 where we
haven't actually implemented converting an attribute to to a token tree yet, but
a local fix was possible here.

Closes rust-lang#47941
Fix docker/run.sh script when run locally

Switch a `mkdir $foo` to `mkdir -p $foo` to handle the case that this script is
being run locally and has previously executed.
resolve: Some renaming, refactoring and comments

Commits are self-descriptive.
The only functional change is rust-lang@34bf2f5 that tightens shadowing rules for macro paths (makes the second and third cases in `test/ui/imports/glob-shadowing.rs` an error).
Add tests for ICEs which no longer repro

Adds tests for some ICEs which no longer repro and closes the associated issues.
@pietroalbini
Copy link
Member Author

@bors r+ p=10

@bors
Copy link
Contributor

bors commented Jul 20, 2018

📌 Commit 6045d93 has been approved by pietroalbini

@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Jul 20, 2018
@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-5.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.
[00:47:22] ....................................................................................................
[00:47:25] ....................................................................................................
[00:47:28] ....................................................................................................
[00:47:32] ....................................................................................................
[00:47:35] ..................................................F.................................................
[00:47:42] ............................................i.......................................................
[00:47:45] ...................................i................................................................
[00:47:49] ....................................................................................................
[00:47:53] ....................................................................................................
[00:47:53] ....................................................................................................
[00:47:57] .....................................................i..............................................
tage2/bin/rustc" "/checkout/src/test/ui/issue-51116.rs" "--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/issue-51116/a" "-Crpath" "-O" "-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/issue-51116/auxiliary" "-A" "unused"
[00:47:59] ------------------------------------------
[00:47:59] 
[00:47:59] ------------------------------------------
[00:47:59] stderr:
[00:47:59] stderr:
[00:47:59] ------------------------------------------
[00:47:59] {"message":"type annotations needed","code":{"code":"E0282","explanation":"\nThis error indicates that type inference did not result in one unique possible\ntype, and extra information is required. In most cases this can be provided\nby adding a type annotation. Sometimes you need to specify a generic type\nparameter manually.\n\nA common example is the `collect` method on `Iterator`. It has a generic type\nparameter with a `FromIterator` bound, which for a `char` iterator is\nimplemented by `Vec` and `String` among others. Consider the following snippet\nthat reverses the characters of a string:\n\n```compile_fail,E0282\nlet x = \"hello\".chars().rev().collect();\n```\n\nIn this case, the compiler cannot infer what the type of `x` should be:\n`Vec<char>` and `String` are both suitable candidates. To specify which type to\nuse, you can use a type annotation on `x`:\n\n```\nlet x: Vec<char> = \"hello\".chars().rev().collect();\n```\n\nIt is not necessary to annotate the full type. Once the ambiguity is resolved,\nthe compiler can infer the rest:\n\n```\nlet x: Vec<_> = \"hello\".chars().rev().collect();\n```\n\nAnother way to provide the compiler with enough information, is to specify the\ngeneric type parameter:\n\n```\nlet x = \"hello\".chars().rev().collect::<Vec<char>>();\n```\n\nAgain, you need not specify the full type if the compiler can infer it:\n\n```\nlet x = \"hello\".chars().rev().collect::<Vec<_>>();\n```\n\nApart from a method or function with a generic type parameter, this error can\noccur when a type parameter of a struct or trait cannot be inferred. In that\ncase it is not always possible to use a type annotation, because all candidates\nhave the same return type. For instance:\n\n```compile_fail,E0282\nstruct Foo<T> {\n    num: T,\n}\n\nimpl<T> Foo<T> {\n    fn bar() -> i32 {\n        0\n    }\n\n    fn baz() {\n        let number = Foo::bar();\n    }\n}\n```\n\nThis will fail because the compiler does not know which instance of `Foo` to\ncall `bar` on. Change `Foo::bar()` to `Foo::<T>::bar()` to resolve the error.\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/issue-51116.rs","byte_start":655,"byte_end":660,"line_start":16,"line_end":16,"column_start":13,"column_end":18,"is_primary":true,"text":[{"text":"            *tile = 0;","highlight_start":13,"highlight_end":18}],"label":"cannot infer type","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"/checkout/src/test/ui/issue-51116.rs","byte_start":563,"byte_end":566,"line_start":14,"line_end":14,"column_start":21,"column_end":24,"is_primary":false,"text":[{"text":"        for tile in row {","highlight_start":21,"highlight_end":24}],"label":"the element type for this iterator is not specified","suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/checkout/src/test/ui/issue-51116.rs","byte_start":563,"byte_end":566,"line_start":14,"line_end":14,"column_start":21,"column_end":24,"is_primary":false,"text":[{"text":"        for tile in row {","highlight_start":21,"highlight_end":24}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},"macro_decl_name":"desugaring of `for loop`","def_site_span":{"file_name":"/checkout/src/test/ui/issue-51116.rs","byte_start":563,"byte_end":566,"line_start":14,"line_end":14,"column_start":21,"column_end":24,"is_primary":false,"text":[{"text":"        for tile in row {","highlight_start":21,"highlight_end":24}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}}],"children":[{"message":"type must be known at this point","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"error[E0282]: type annotations needed\n  --> /checkout/src/test/ui/issue-51116.rs:16:13\n   |\nLL |         for tile in row {\n   |                     --- the element type for this iterator is not specified\nLL |             //~^ NOTE the element type for this iterator is not specified\nLL |             *tile = 0;\n   |             ^^^^^ cannot infer type\n   |\n   = note: type must be known at this point\n\n"}
[00:47:59] {"message":"aborting due to previous error","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to previous error\n\n"}
[00:47:59] {"message":"For more information about this error, try `rustc --explain E0282`.","code":null,"level":"","spans":[],"children":[],"rendered":"For more information about this error, try `rustc --explain E0282`.\n"}
[00:47:59] ------------------------------------------
[00:47:59] 
[00:47:59] thread '[ui] ui/issue-51116.rs' panicked at 'explicit panic', tools/compiletest/src/runtest.rs:3137:9
[00:47:59] note: Run with `RUST_BACKTRACE=1` for a backtrace.
---
[00:47:59] 
[00:47:59] thread 'main' panicked at 'Some tests failed', tools/compiletest/src/main.rs:498:22
[00:47:59] 
[00:47:59] 
[00:47:59] 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" "--build-base" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui" "--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-5.0/bin/FileCheck" "--host-rustcflags" "-Crpath -O -Zunstable-options " "--target-rustcflags" "-Crpath -O -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" "5.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"
[00:47:59] 
[00:47:59] 
[00:47:59] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
[00:47:59] Build completed unsuccessfully in 0:01:49
[00:47:59] Build completed unsuccessfully in 0:01:49
[00:47:59] Makefile:58: recipe for target 'check' failed
[00:47:59] make: *** [check] Error 1

The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:0567cec4
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
---
travis_time:end:1414112d:start=1532097782219063882,finish=1532097782232155023,duration=13091141
travis_fold:end:after_failure.4
travis_fold:start:after_failure.5
travis_time:start:03b30c14
$ 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:0212e486
$ 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)

@pietroalbini
Copy link
Member Author

@bors r- #52507 failed

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jul 20, 2018
@pietroalbini pietroalbini deleted the rollup branch July 20, 2018 14:48
@Centril Centril added the rollup A PR which is a rollup label Oct 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rollup A PR which is a rollup S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants