Skip to content

Update E0191 to the new error format - #35396

Merged
bors merged 1 commit into
rust-lang:masterfrom
munyari:e0191
Aug 10, 2016
Merged

Update E0191 to the new error format#35396
bors merged 1 commit into
rust-lang:masterfrom
munyari:e0191

Conversation

@munyari

Copy link
Copy Markdown
Contributor

@rust-highfive

Copy link
Copy Markdown
Contributor

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @jonathandturner (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@sophiajt

Copy link
Copy Markdown
Contributor

Thanks for the PR!

Please also update the test case that goes along with E0191, so we can make sure the new label gets tested.

@munyari

Copy link
Copy Markdown
ContributorAuthor

Will do!

@munyari

Copy link
Copy Markdown
ContributorAuthor

And didn't mention that this is #35278

@munyari

Copy link
Copy Markdown
ContributorAuthor

@jonathandturner how exactly do I test for the span? Should I add something to src/test/compile-fail/E0191.rs?

@sophiajt

Copy link
Copy Markdown
Contributor

@munyari - yes. You can see examples by reading the blog post and looking at PRs that have been accepted.

@munyari

Copy link
Copy Markdown
ContributorAuthor

Hi @jonathandturner, I've updated the test file but am still getting errors. Specifically, the test associated-type-projection-ambig-between-bound-and-where-clause fails, even when I add //~| NOTE missing associated type Color value to the test comments.

@sophiajt

Copy link
Copy Markdown
Contributor

@munyari - when the test fails, can you copy/paste the error it gives you?

@munyari

Copy link
Copy Markdown
ContributorAuthor

Sure.

$ python src/bootstrap/bootstrap.py --step check-cfail associated-type-projection-from-multiple-supertraits --stage 1
Building stage0 std artifacts (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
Building stage0 test artifacts (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
Building stage0 compiler artifacts (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
Building stage1 std artifacts (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
Building stage1 test artifacts (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
Building stage1 tool compiletest (x86_64-unknown-linux-gnu)
Check compiletest compile-fail (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
running 1 test
test [compile-fail] compile-fail/associated-type-projection-from-multiple-supertraits.rs ... FAILED
failures:
---- [compile-fail] compile-fail/associated-type-projection-from-multiple-supertraits.rs stdout ----
error: /home/nash/code/rust/src/test/compile-fail/associated-type-projection-from-multiple-supertraits.rs:35: unexpected "note": 'missing associated type `Color` value'
error: 1 unexpected errors found, 0 expected errors not found
status: exit code: 101
command: /home/nash/code/rust/build/x86_64-unknown-linux-gnu/stage1/bin/rustc /home/nash/code/rust/src/test/compile-fail/associated-type-projection-from-multiple-supertraits.rs -L /home/nash/code/rust/build/x86_64-unknown-linux-gnu/test/compile-fail --target=x86_64-unknown-linux-gnu --error-format json -Z unstable-options -L /home/nash/code/rust/build/x86_64-unknown-linux-gnu/test/compile-fail/associated-type-projection-from-multiple-supertraits.stage1-x86_64-unknown-linux-gnu.compile-fail.libaux -C prefer-dynamic -o /home/nash/code/rust/build/x86_64-unknown-linux-gnu/test/compile-fail/associated-type-projection-from-multiple-supertraits.stage1-x86_64-unknown-linux-gnu -Crpath -O -Lnative=/home/nash/code/rust/build/x86_64-unknown-linux-gnu/rust-test-helpers
unexpected errors (from JSON output): [
Error {
line_num: 35,
kind: Some(
Note
),
msg: "missing associated type `Color` value"
}
]
thread '[compile-fail] compile-fail/associated-type-projection-from-multiple-supertraits.rs' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:1082
note: Run with `RUST_BACKTRACE=1` for a backtrace.
failures:
[compile-fail] compile-fail/associated-type-projection-from-multiple-supertraits.rs
test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured
command did not execute successfully: "/home/nash/code/rust/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/compiletest" "--compile-lib-path" "/home/nash/code/rust/build/x86_64-unknown-linux-gnu/stage1/lib" "--run-lib-path" "/home/nash/code/rust/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib" "--rustc-path" "/home/nash/code/rust/build/x86_64-unknown-linux-gnu/stage1/bin/rustc" "--rustdoc-path" "/home/nash/code/rust/build/x86_64-unknown-linux-gnu/stage1/bin/rustdoc" "--src-base" "/home/nash/code/rust/src/test/compile-fail" "--build-base" "/home/nash/code/rust/build/x86_64-unknown-linux-gnu/test/compile-fail" "--stage-id" "stage1-x86_64-unknown-linux-gnu" "--mode" "compile-fail" "--target" "x86_64-unknown-linux-gnu" "--host" "x86_64-unknown-linux-gnu" "--llvm-filecheck" "/home/nash/code/rust/build/x86_64-unknown-linux-gnu/llvm/build/bin/FileCheck" "--host-rustcflags" "-Crpath -O" "--target-rustcflags" "-Crpath -O -Lnative=/home/nash/code/rust/build/x86_64-unknown-linux-gnu/rust-test-helpers" "--docck-python" "python" "--lldb-python" "python" "associated-type-projection-from-multiple-supertraits" "--cc" "" "--cxx" "" "--cflags" "" "--llvm-components" "" "--llvm-cxxflags" "" "--adb-path" "adb" "--adb-test-dir" "/data/tmp" "--android-cross-path" ""
expected success, got: exit code: 101

@sophiajt

sophiajt commented Aug 6, 2016

Copy link
Copy Markdown
Contributor

It looks like there's one more test case that needs to be updated. Look at:

error: /home/nash/code/rust/src/test/compile-fail/associated-type-projection-from-multiple-supertraits.rs:35: unexpected "note": 'missing associated type `Color` value'

File src/test/compile-fail/associated-type-projection-from-multiple-supertraits.rs on line 35 looks like it needs a NOTE also that says 'missing associated type Color value'

You can add it the same way you did in file src/test/compile-fail/E0191.rs

@munyari

Copy link
Copy Markdown
ContributorAuthor

Sweet! I'd somehow ended up editing the wrong file.

@munyari

Copy link
Copy Markdown
ContributorAuthor

Should I squash the commits?

@sophiajt

Copy link
Copy Markdown
Contributor

@munyari - yes, please squash the commits.

@munyari

Copy link
Copy Markdown
ContributorAuthor

@jonathandturner I think this is ready

@sophiajt

Copy link
Copy Markdown
Contributor

Looks good!

@bors r+ rollup

@bors

bors commented Aug 7, 2016

Copy link
Copy Markdown
Collaborator

📌 Commit b79e15d has been approved by jonathandturner

sophiajt pushed a commit to sophiajt/rust that referenced this pull request Aug 7, 2016
@sophiajtsophiajt mentioned this pull request Aug 7, 2016
bors added a commit that referenced this pull request Aug 7, 2016
Rollup of 6 pull requests
- Successful merges: #35396, #35402, #35446, #35466, #35470, #35475
- Failed merges: #35395, #35415
@bors

bors commented Aug 7, 2016

Copy link
Copy Markdown
Collaborator

⌛ Testing commit b79e15d with merge 9174f89...

@bors

bors commented Aug 8, 2016

Copy link
Copy Markdown
Collaborator

💔 Test failed - auto-win-gnu-32-opt-rustbuild

sophiajt pushed a commit to sophiajt/rust that referenced this pull request Aug 8, 2016
@sophiajtsophiajt mentioned this pull request Aug 8, 2016
steveklabnik added a commit to steveklabnik/rust that referenced this pull request Aug 10, 2016
bors added a commit that referenced this pull request Aug 10, 2016
@bors
bors merged commit b79e15d into rust-lang:masterAug 10, 2016
@munyari
munyari deleted the e0191 branch August 11, 2016 01:07
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@munyari@rust-highfive@sophiajt@bors