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

Cleanup E0412 and E0422 #69917

Merged
merged 2 commits into from
Mar 16, 2020
Merged

Cleanup E0412 and E0422 #69917

merged 2 commits into from
Mar 16, 2020

Conversation

GuillaumeGomez
Copy link
Member

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Mar 11, 2020
@rust-highfive
Copy link
Collaborator

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.
2020-03-11T12:08:42.7112643Z ========================== Starting Command Output ===========================
2020-03-11T12:08:42.7114820Z [command]/bin/bash --noprofile --norc /home/vsts/work/_temp/2bdea09a-409a-436c-891b-17ae92833346.sh
2020-03-11T12:08:42.7115513Z 
2020-03-11T12:08:42.7119369Z ##[section]Finishing: Disable git automatic line ending conversion
2020-03-11T12:08:42.7137243Z ##[section]Starting: Checkout rust-lang/rust@refs/pull/69917/merge to s
2020-03-11T12:08:42.7141061Z Task         : Get sources
2020-03-11T12:08:42.7141314Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
2020-03-11T12:08:42.7141612Z Version      : 1.0.0
2020-03-11T12:08:42.7141780Z Author       : Microsoft
---
2020-03-11T12:08:43.9581213Z ##[command]git remote add origin https://github.com/rust-lang/rust
2020-03-11T12:08:43.9589089Z ##[command]git config gc.auto 0
2020-03-11T12:08:43.9592139Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2020-03-11T12:08:43.9594814Z ##[command]git config --get-all http.proxy
2020-03-11T12:08:43.9602387Z ##[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/69917/merge:refs/remotes/pull/69917/merge
---
2020-03-11T13:06:05.9659321Z .................................................................................................... 1700/9755
2020-03-11T13:06:10.6691435Z .................................................................................................... 1800/9755
2020-03-11T13:06:22.5186117Z .............................................................i...................................... 1900/9755
2020-03-11T13:06:30.1192310Z .................................................................................................... 2000/9755
2020-03-11T13:06:45.1630615Z ...................................................iiiii............................................ 2100/9755
2020-03-11T13:06:55.4470010Z .................................................................................................... 2300/9755
2020-03-11T13:06:57.6813508Z .................................................................................................... 2400/9755
2020-03-11T13:07:00.9199387Z .................................................................................................... 2500/9755
2020-03-11T13:07:22.9677014Z .................................................................................................... 2600/9755
---
2020-03-11T13:10:04.1056255Z .....................i...............i.............................................................. 5000/9755
2020-03-11T13:10:13.8844961Z .................................................................................................... 5100/9755
2020-03-11T13:10:19.5175864Z ................................................................i................................... 5200/9755
2020-03-11T13:10:25.9014492Z .................................................................................................... 5300/9755
2020-03-11T13:10:35.1996927Z .............................................ii.ii........i...i..................................... 5400/9755
2020-03-11T13:10:43.2431876Z .................................................................................................... 5600/9755
2020-03-11T13:10:52.9843250Z ..................F................................................................................. 5700/9755
2020-03-11T13:10:59.7296425Z ....................................i............................................................... 5800/9755
2020-03-11T13:11:05.6221183Z .................................................................................................... 5900/9755
2020-03-11T13:11:05.6221183Z .................................................................................................... 5900/9755
2020-03-11T13:11:16.2903534Z .................................................................................................... 6000/9755
2020-03-11T13:11:25.6264980Z .............................ii...i..ii...........i................................................. 6100/9755
2020-03-11T13:11:43.1049960Z .................................................................................................... 6300/9755
2020-03-11T13:11:50.0626208Z .................................................................................................... 6400/9755
2020-03-11T13:11:50.0626208Z .................................................................................................... 6400/9755
2020-03-11T13:11:56.6108434Z ............................................................i..ii................................... 6500/9755
2020-03-11T13:12:22.7592414Z .................................................................................................... 6700/9755
2020-03-11T13:12:26.5324698Z ......................................................i............................................. 6800/9755
2020-03-11T13:12:28.5180286Z .................................................................................................... 6900/9755
2020-03-11T13:12:30.5466901Z .....................................................................................i.............. 7000/9755
---
2020-03-11T13:14:10.5427959Z .................................................................................................... 7700/9755
2020-03-11T13:14:14.6096783Z .................................................................................................... 7800/9755
2020-03-11T13:14:20.5751804Z .................................................................................................... 7900/9755
2020-03-11T13:14:27.6502731Z ...................................i................................................................ 8000/9755
2020-03-11T13:14:36.6367238Z ....................................................................................iiiiiiiiii.i.... 8100/9755
2020-03-11T13:14:52.6555543Z ............................i......i................................................................ 8300/9755
2020-03-11T13:14:57.4629710Z .................................................................................................... 8400/9755
2020-03-11T13:15:08.9275453Z .................................................................................................... 8500/9755
2020-03-11T13:15:20.9643414Z .................................................................................................... 8600/9755
---
2020-03-11T13:17:18.2044929Z 8 
2020-03-11T13:17:18.2045047Z 
2020-03-11T13:17:18.2045138Z 
2020-03-11T13:17:18.2045348Z The actual stderr differed from the expected stderr.
2020-03-11T13:17:18.2046011Z Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/lint/use_suggestion_json/use_suggestion_json.stderr
2020-03-11T13:17:18.2046631Z To update references, rerun the tests and pass the `--bless` flag
2020-03-11T13:17:18.2047176Z To only update this specific test, also pass `--test-args lint/use_suggestion_json.rs`
2020-03-11T13:17:18.2047612Z error: 1 errors occurred comparing output.
2020-03-11T13:17:18.2047896Z failed to decode compiler output as json: line: {
2020-03-11T13:17:18.2048123Z output: {
2020-03-11T13:17:18.2048361Z   "message": "cannot find type `Iter` in this scope",
2020-03-11T13:17:18.2048361Z   "message": "cannot find type `Iter` in this scope",
2020-03-11T13:17:18.2048586Z   "code": {
2020-03-11T13:17:18.2048757Z     "code": "E0412",
2020-03-11T13:17:18.2057475Z     "explanation": "A used type name is not in scope.\n\nErroneous code examples:\n\n```compile_fail,E0412\nimpl Something {} // error: type name `Something` is not in scope\n\n// or:\n\ntrait Foo {\n    fn bar(N); // error: type name `N` is not in scope\n}\n\n// or:\n\nfn foo(x: T) {} // type name `T` is not in scope\n```\n\nTo fix this error, please verify you didn't misspell the type name, you did\ndeclare it or imported it into the scope. Examples:\n\n```\nstruct Something;\n\nimpl Something {} // ok!\n\n// or:\n\ntrait Foo {\n    type N;\n\n    fn bar(_: Self::N); // ok!\n}\n\n// or:\n\nfn foo<T>(x: T) {} // ok!\n```\n\nAnother case that causes this error is when a type is imported into a parent\nmodule. To fix this, you can follow the suggestion and use File directly or\n`use super::File;` which will import the types from the parent namespace. An\nexample that causes this error is below:\n\n```compile_fail,E0412\nuse std::fs::File;\n\nmod foo {\n    fn some_function(f: File) {}\n}\n```\n\n```\nuse std::fs::File;\n\nmod foo {\n    // either\n    use super::File;\n    // or\n    // use std::fs::File;\n    fn foo(f: File) {}\n}\n# fn main() {} // don't insert it for us; that'll break imports\n```\n"
2020-03-11T13:17:18.2064935Z   },
2020-03-11T13:17:18.2065102Z   "level": "error",
2020-03-11T13:17:18.2065299Z   "spans": [
2020-03-11T13:17:18.2065703Z       "file_name": "/checkout/src/test/ui/lint/use_suggestion_json.rs",
2020-03-11T13:17:18.2066172Z       "byte_start": 471,
2020-03-11T13:17:18.2066374Z       "byte_end": 475,
2020-03-11T13:17:18.2066572Z       "line_start": 12,
2020-03-11T13:17:18.2066572Z       "line_start": 12,
2020-03-11T13:17:18.2066789Z       "line_end": 12,
2020-03-11T13:17:18.2066989Z       "column_start": 12,
2020-03-11T13:17:18.2067194Z       "column_end": 16,
2020-03-11T13:17:18.2067412Z       "is_primary": true,
2020-03-11T13:17:18.2067601Z       "text": [
2020-03-11T13:17:18.2067754Z         {
2020-03-11T13:17:18.2067953Z           "text": "    let x: Iter;",
2020-03-11T13:17:18.2068220Z           "highlight_start": 12,
2020-03-11T13:17:18.2068451Z           "highlight_end": 16
2020-03-11T13:17:18.2068782Z       ],
2020-03-11T13:17:18.2068979Z       "label": "not found in this scope",
2020-03-11T13:17:18.2069234Z       "suggested_replacement": null,
2020-03-11T13:17:18.2069508Z       "suggestion_applicability": null,
2020-03-11T13:17:18.2069508Z       "suggestion_applicability": null,
2020-03-11T13:17:18.2069738Z       "expansion": null
2020-03-11T13:17:18.2069899Z     }
2020-03-11T13:17:18.2070036Z   ],
2020-03-11T13:17:18.2070181Z   "children": [
2020-03-11T13:17:18.2070327Z     {
2020-03-11T13:17:18.2070612Z       "message": "possible candidates are found in other modules, you can import them into scope",
2020-03-11T13:17:18.2070950Z       "code": null,
2020-03-11T13:17:18.2071141Z       "level": "help",
2020-03-11T13:17:18.2071344Z       "spans": [
2020-03-11T13:17:18.2071756Z           "file_name": "/checkout/src/test/ui/lint/use_suggestion_json.rs",
2020-03-11T13:17:18.2072053Z           "byte_start": 448,
2020-03-11T13:17:18.2072286Z           "byte_end": 448,
2020-03-11T13:17:18.2072501Z           "line_start": 11,
---
2020-03-11T13:17:18.2139610Z       ],
2020-03-11T13:17:18.2139778Z       "children": [],
2020-03-11T13:17:18.2139997Z       "rendered": null
2020-03-11T13:17:18.2140169Z     }
2020-03-11T13:17:18.2140295Z   ],
2020-03-11T13:17:18.2146968Z   "rendered": "\u001b[0m\u001b[1m\u001b[38;5;9merror[E0412]\u001b[0m\u001b[0m\u001b[1m: cannot find type `Iter` in this scope\u001b[0m\n\u001b[0m  \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0m/checkout/src/test/ui/lint/use_suggestion_json.rs:12:12\u001b[0m\n\u001b[0m   \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12mLL\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m    let x: Iter;\u001b[0m\n\u001b[0m   \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m           \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;9m^^^^\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;9mnot found in this scope\u001b[0m\n\u001b[0m   \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;14mhelp\u001b[0m\u001b[0m: possible candidates are found in other modules, you can import them into scope\u001b[0m\n\u001b[0m   \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12mLL\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0muse std::collections::binary_heap::Iter;\u001b[0m\n\u001b[0m   \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12mLL\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0muse std::collections::btree_map::Iter;\u001b[0m\n\u001b[0m   \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12mLL\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0muse std::collections::btree_set::Iter;\u001b[0m\n\u001b[0m   \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12mLL\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0muse std::collections::hash_map::Iter;\u001b[0m\n\u001b[0m   \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m     and 8 other candidates\u001b[0m\n\n"
2020-03-11T13:17:18.2151545Z {
2020-03-11T13:17:18.2151736Z   "message": "aborting due to previous error",
2020-03-11T13:17:18.2151973Z   "code": null,
2020-03-11T13:17:18.2151973Z   "code": null,
2020-03-11T13:17:18.2152150Z   "level": "error",
2020-03-11T13:17:18.2152322Z   "spans": [],
2020-03-11T13:17:18.2152509Z   "children": [],
2020-03-11T13:17:18.2153139Z   "rendered": "\u001b[0m\u001b[1m\u001b[38;5;9merror\u001b[0m\u001b[0m\u001b[1m: aborting due to previous error\u001b[0m\n\n"
2020-03-11T13:17:18.2158806Z {
2020-03-11T13:17:18.2159553Z   "message": "For more information about this error, try `rustc --explain E0412`.",
2020-03-11T13:17:18.2159852Z   "code": null,
2020-03-11T13:17:18.2160225Z   "level": "failure-note",
2020-03-11T13:17:18.2160225Z   "level": "failure-note",
2020-03-11T13:17:18.2160411Z   "spans": [],
2020-03-11T13:17:18.2160582Z   "children": [],
2020-03-11T13:17:18.2161156Z   "rendered": "\u001b[0m\u001b[1mFor more information about this error, try `rustc --explain E0412`.\u001b[0m\n"
2020-03-11T13:17:18.2162075Z thread '[ui] ui/lint/use_suggestion_json.rs' panicked at 'explicit panic', src/tools/compiletest/src/json.rs:87:21
2020-03-11T13:17:18.2162984Z note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
2020-03-11T13:17:18.2163225Z 
2020-03-11T13:17:18.2164008Z 
---
2020-03-11T13:17:18.2165865Z 
2020-03-11T13:17:18.2166343Z thread 'main' panicked at 'Some tests failed', src/tools/compiletest/src/main.rs:348:22
2020-03-11T13:17:18.2166634Z 
2020-03-11T13:17:18.2166725Z 
2020-03-11T13:17:18.2175239Z 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-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" "" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" "" "--color" "always"
2020-03-11T13:17:18.2191687Z 
2020-03-11T13:17:18.2191783Z 
2020-03-11T13:17:18.2192032Z failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
2020-03-11T13:17:18.2192341Z Build completed unsuccessfully in 1:03:02
2020-03-11T13:17:18.2192341Z Build completed unsuccessfully in 1:03:02
2020-03-11T13:17:18.2192812Z == clock drift check ==
2020-03-11T13:17:18.2193105Z   local time: Wed Mar 11 13:17:18 UTC 2020
2020-03-11T13:17:18.4899500Z   network time: Wed, 11 Mar 2020 13:17:18 GMT
2020-03-11T13:17:18.4899802Z == end clock drift check ==
2020-03-11T13:17:18.9342749Z 
2020-03-11T13:17:18.9425883Z ##[error]Bash exited with code '1'.
2020-03-11T13:17:18.9441237Z ##[section]Finishing: Run build
2020-03-11T13:17:18.9499370Z ##[section]Starting: Checkout rust-lang/rust@refs/pull/69917/merge to s
2020-03-11T13:17:18.9504420Z Task         : Get sources
2020-03-11T13:17:18.9504764Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
2020-03-11T13:17:18.9505082Z Version      : 1.0.0
2020-03-11T13:17:18.9505288Z Author       : Microsoft
2020-03-11T13:17:18.9505288Z Author       : Microsoft
2020-03-11T13:17:18.9505618Z Help         : [More Information](https://go.microsoft.com/fwlink/?LinkId=798199)
2020-03-11T13:17:18.9506020Z ==============================================================================
2020-03-11T13:17:19.2974452Z Cleaning any cached credential from repository: rust-lang/rust (GitHub)
2020-03-11T13:17:19.3039386Z ##[section]Finishing: Checkout rust-lang/rust@refs/pull/69917/merge to s
2020-03-11T13:17:19.3129866Z Cleaning up task key
2020-03-11T13:17:19.3131059Z Start cleaning up orphan processes.
2020-03-11T13:17:19.3494641Z Terminate orphan process: pid (5519) (python)
2020-03-11T13:17:19.3550060Z ##[section]Finishing: Finalize Job

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 @rust-lang/infra. (Feature Requests)

@@ -1,4 +1,5 @@
You are trying to use an identifier that is either undefined or not a struct.
An identifier that is either undefined or not a struct was used.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
An identifier that is either undefined or not a struct was used.
An identifier that is neither undefined nor a struct was used.

@Dylan-DPC-zz
Copy link

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Mar 13, 2020

📌 Commit 752b511 has been approved by Dylan-DPC

@bors
Copy link
Contributor

bors commented Mar 13, 2020

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

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 13, 2020
@pietroalbini
Copy link
Member

Had to kill the PR build to get CI back up and running, sorry for the trouble.

@Dylan-DPC-zz
Copy link

No worries :)

Centril added a commit to Centril/rust that referenced this pull request Mar 13, 2020
@JohnTitor
Copy link
Member

Failed in #69979 (comment)
You should bless ui/lint/use_suggestion_json.rs test, it includes E0412 description.

@bors r-

@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 Mar 13, 2020
@Dylan-DPC-zz
Copy link

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Mar 15, 2020

📌 Commit 138d29d has been approved by Dylan-DPC

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Mar 15, 2020
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request Mar 15, 2020
bors added a commit that referenced this pull request Mar 16, 2020
Rollup of 8 pull requests

Successful merges:

 - #69686 (Use `pprust` to print attributes in rustdoc)
 - #69858 (std: on Windows, use GetSystemTimePreciseAsFileTime if it is available)
 - #69917 (Cleanup E0412 and E0422)
 - #69964 (Add Node.js to PR CI image)
 - #69992 (Block version-specific docs from search engines)
 - #69995 (Add more context to the literal overflow message)
 - #69998 (Add long error explanation for E0634)
 - #70014 (Small fixes in rustdoc book)

Failed merges:

r? @ghost
@bors bors merged commit bbdc871 into rust-lang:master Mar 16, 2020
@GuillaumeGomez GuillaumeGomez deleted the cleanup-e0412 branch March 16, 2020 17:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants