Skip to content

Rollup of 11 pull requests #77517

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

Merged
merged 43 commits into from
Oct 4, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
ac96f5b
Test and reject out-of-bounds shuffle vectors
workingjubilee Sep 15, 2020
43c181b
Use `tracing` spans to trace the entire MIR interp stack
oli-obk Aug 4, 2020
916d236
updated p! macro to accept literals
jakevossen5 Sep 30, 2020
d103fe1
Fixed more write literals after master merge
jakevossen5 Sep 30, 2020
f69a88b
updated p! macro to accept literals
jakevossen5 Sep 30, 2020
5032674
fixed merge conflicts
jakevossen5 Sep 30, 2020
dffb9d6
cargo fmt
jakevossen5 Sep 30, 2020
c1e17f5
Add a regression test for issue-66501
JohnTitor Oct 1, 2020
8631e1c
Add a regression test for issue-68951
JohnTitor Oct 1, 2020
50ffd6b
Add a regression test for issue-72565
JohnTitor Oct 1, 2020
d4fdf6e
Add a regression test for issue-74244
JohnTitor Oct 1, 2020
38f460f
Add a regression test for issue-75299
JohnTitor Oct 1, 2020
8f9472c
Only mention that a stack frame is being popped when starting to do so
oli-obk Oct 1, 2020
de21c3d
Create E0777 error code for "invalid literal in derive"
GuillaumeGomez Oct 1, 2020
8b7aeef
Import struct_span_err macro instead of prepending it
GuillaumeGomez Oct 1, 2020
cd159fd
Uplift drop-bounds lint from clippy
notriddle Aug 19, 2020
90c8b43
BTreeMap: document DrainFilterInner better
ssomers Sep 26, 2020
d1d94ba
Improve E0777 help message
GuillaumeGomez Oct 2, 2020
dceb81a
Deprecate clippy lint
notriddle Oct 2, 2020
3ea96b8
made multiline macro calls into single line
jakevossen5 Oct 2, 2020
4c9bcf3
Fix test name
camelid Oct 2, 2020
87f3f81
Improve rustdoc error for failed intra-doc link resolution
camelid Oct 2, 2020
0193a88
Remove unhelpful help message
camelid Oct 2, 2020
21fb9df
Use old error when there's partial resolution
camelid Oct 3, 2020
c47caea
Macro-expand test to cover all possible lanes
workingjubilee Oct 3, 2020
aa9b718
Improve error messages
camelid Oct 3, 2020
f296163
Place all-targets checking behind a flag
Mark-Simulacrum Oct 2, 2020
bcab97c
Check all Cargo targets on CI
Mark-Simulacrum Oct 2, 2020
eaa0186
Add quotes around command in CHANGELOG
ecstatic-morse Oct 3, 2020
018d587
fixed going over 100 chars in line
jakevossen5 Oct 3, 2020
2fcd183
Flatten arrows with further comment
workingjubilee Oct 3, 2020
250b4ad
Fix capitalization in blog post name
camelid Oct 3, 2020
6e25418
Rollup merge of #75143 - oli-obk:tracing, r=RalfJung
JohnTitor Oct 4, 2020
b654555
Rollup merge of #75699 - notriddle:drop-bounds-lint, r=petrochenkov
JohnTitor Oct 4, 2020
65e4488
Rollup merge of #76768 - workingjubilee:reject-oob-shuffles, r=ralfjung
JohnTitor Oct 4, 2020
44ce38a
Rollup merge of #77190 - jakevossen5:master, r=eddyb
JohnTitor Oct 4, 2020
f09c962
Rollup merge of #77388 - JohnTitor:add-tests, r=Dylan-DPC
JohnTitor Oct 4, 2020
830d1a0
Rollup merge of #77419 - GuillaumeGomez:create-e0777, r=jyn514
JohnTitor Oct 4, 2020
25d0650
Rollup merge of #77447 - ssomers:btree_cleanup_8, r=Mark-Simulacrum
JohnTitor Oct 4, 2020
9db26b7
Rollup merge of #77468 - camelid:fix-test-name, r=Dylan-DPC
JohnTitor Oct 4, 2020
0ed4849
Rollup merge of #77469 - camelid:rustdoc-better-failed-res-error, r=j…
JohnTitor Oct 4, 2020
69f2cf5
Rollup merge of #77473 - Mark-Simulacrum:check-limited, r=ecstatic-morse
JohnTitor Oct 4, 2020
f5db166
Rollup merge of #77508 - camelid:patch-8, r=jonas-schievink
JohnTitor Oct 4, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Improve error messages
  • Loading branch information
camelid committed Oct 3, 2020
commit aa9b718cf0d4157a81c5dcc8d59f2c4ed96b801e
9 changes: 4 additions & 5 deletions src/librustdoc/passes/collect_intra_doc_links.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1577,13 +1577,12 @@ fn resolution_failure(
// See if this was a module: `[path]` or `[std::io::nope]`
if let Some(module) = last_found_module {
let note = if partial_res.is_some() {
// Part of the link resolved; e.g. `std::io::nonexistent`
let module_name = collector.cx.tcx.item_name(module);
format!(
"the module `{}` contains no item named `{}`",
module_name, unresolved
)
format!("no item named `{}` in module `{}`", unresolved, module_name)
} else {
format!("there is no item named `{}` in scope", unresolved)
// None of the link resolved; e.g. `Notimported`
format!("no item named `{}` in scope", unresolved)
};
if let Some(span) = sp {
diag.span_label(span, &note);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ error: unresolved link to `v2`
--> $DIR/deny-intra-link-resolution-failure.rs:3:6
|
LL | /// [v2]
| ^^ there is no item named `v2` in scope
| ^^ no item named `v2` in scope
|
note: the lint level is defined here
--> $DIR/deny-intra-link-resolution-failure.rs:1:9
Expand Down
10 changes: 5 additions & 5 deletions src/test/rustdoc-ui/intra-link-errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,23 @@

/// [path::to::nonexistent::module]
//~^ ERROR unresolved link
//~| NOTE there is no item named `path` in scope
//~| NOTE no item named `path` in scope

/// [path::to::nonexistent::macro!]
//~^ ERROR unresolved link
//~| NOTE there is no item named `path` in scope
//~| NOTE no item named `path` in scope

/// [type@path::to::nonexistent::type]
//~^ ERROR unresolved link
//~| NOTE there is no item named `path` in scope
//~| NOTE no item named `path` in scope

/// [std::io::not::here]
//~^ ERROR unresolved link
//~| NOTE `io` contains no item named `not`
//~| NOTE no item named `not` in module `io`

/// [type@std::io::not::here]
//~^ ERROR unresolved link
//~| NOTE `io` contains no item named `not`
//~| NOTE no item named `not` in module `io`

/// [std::io::Error::x]
//~^ ERROR unresolved link
Expand Down
10 changes: 5 additions & 5 deletions src/test/rustdoc-ui/intra-link-errors.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ error: unresolved link to `path::to::nonexistent::module`
--> $DIR/intra-link-errors.rs:7:6
|
LL | /// [path::to::nonexistent::module]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ there is no item named `path` in scope
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no item named `path` in scope
|
note: the lint level is defined here
--> $DIR/intra-link-errors.rs:1:9
Expand All @@ -14,25 +14,25 @@ error: unresolved link to `path::to::nonexistent::macro`
--> $DIR/intra-link-errors.rs:11:6
|
LL | /// [path::to::nonexistent::macro!]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ there is no item named `path` in scope
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no item named `path` in scope

error: unresolved link to `path::to::nonexistent::type`
--> $DIR/intra-link-errors.rs:15:6
|
LL | /// [type@path::to::nonexistent::type]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ there is no item named `path` in scope
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no item named `path` in scope

error: unresolved link to `std::io::not::here`
--> $DIR/intra-link-errors.rs:19:6
|
LL | /// [std::io::not::here]
| ^^^^^^^^^^^^^^^^^^ the module `io` contains no item named `not`
| ^^^^^^^^^^^^^^^^^^ no item named `not` in module `io`

error: unresolved link to `std::io::not::here`
--> $DIR/intra-link-errors.rs:23:6
|
LL | /// [type@std::io::not::here]
| ^^^^^^^^^^^^^^^^^^^^^^^ the module `io` contains no item named `not`
| ^^^^^^^^^^^^^^^^^^^^^^^ no item named `not` in module `io`

error: unresolved link to `std::io::Error::x`
--> $DIR/intra-link-errors.rs:27:6
Expand Down
2 changes: 1 addition & 1 deletion src/test/rustdoc-ui/intra-link-span-ice-55723.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ error: unresolved link to `i`
--> $DIR/intra-link-span-ice-55723.rs:9:10
|
LL | /// (arr[i])
| ^ there is no item named `i` in scope
| ^ no item named `i` in scope
|
note: the lint level is defined here
--> $DIR/intra-link-span-ice-55723.rs:1:9
Expand Down
8 changes: 4 additions & 4 deletions src/test/rustdoc-ui/intra-links-warning-crlf.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ warning: unresolved link to `error`
--> $DIR/intra-links-warning-crlf.rs:7:6
|
LL | /// [error]
| ^^^^^ there is no item named `error` in scope
| ^^^^^ no item named `error` in scope
|
= note: `#[warn(broken_intra_doc_links)]` on by default
= help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
Expand All @@ -11,23 +11,23 @@ warning: unresolved link to `error1`
--> $DIR/intra-links-warning-crlf.rs:12:11
|
LL | /// docs [error1]
| ^^^^^^ there is no item named `error1` in scope
| ^^^^^^ no item named `error1` in scope
|
= help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`

warning: unresolved link to `error2`
--> $DIR/intra-links-warning-crlf.rs:15:11
|
LL | /// docs [error2]
| ^^^^^^ there is no item named `error2` in scope
| ^^^^^^ no item named `error2` in scope
|
= help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`

warning: unresolved link to `error`
--> $DIR/intra-links-warning-crlf.rs:23:20
|
LL | * It also has an [error].
| ^^^^^ there is no item named `error` in scope
| ^^^^^ no item named `error` in scope
|
= help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`

Expand Down
36 changes: 18 additions & 18 deletions src/test/rustdoc-ui/intra-links-warning.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -10,53 +10,53 @@ warning: unresolved link to `Bar::foo`
--> $DIR/intra-links-warning.rs:3:35
|
LL | //! Test with [Foo::baz], [Bar::foo], ...
| ^^^^^^^^ there is no item named `Bar` in scope
| ^^^^^^^^ no item named `Bar` in scope

warning: unresolved link to `Uniooon::X`
--> $DIR/intra-links-warning.rs:6:13
|
LL | //! , [Uniooon::X] and [Qux::Z].
| ^^^^^^^^^^ there is no item named `Uniooon` in scope
| ^^^^^^^^^^ no item named `Uniooon` in scope

warning: unresolved link to `Qux::Z`
--> $DIR/intra-links-warning.rs:6:30
|
LL | //! , [Uniooon::X] and [Qux::Z].
| ^^^^^^ there is no item named `Qux` in scope
| ^^^^^^ no item named `Qux` in scope

warning: unresolved link to `Uniooon::X`
--> $DIR/intra-links-warning.rs:10:14
|
LL | //! , [Uniooon::X] and [Qux::Z].
| ^^^^^^^^^^ there is no item named `Uniooon` in scope
| ^^^^^^^^^^ no item named `Uniooon` in scope

warning: unresolved link to `Qux::Z`
--> $DIR/intra-links-warning.rs:10:31
|
LL | //! , [Uniooon::X] and [Qux::Z].
| ^^^^^^ there is no item named `Qux` in scope
| ^^^^^^ no item named `Qux` in scope

warning: unresolved link to `Qux:Y`
--> $DIR/intra-links-warning.rs:14:13
|
LL | /// [Qux:Y]
| ^^^^^ there is no item named `Qux:Y` in scope
| ^^^^^ no item named `Qux:Y` in scope
|
= help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`

warning: unresolved link to `error`
--> $DIR/intra-links-warning.rs:58:30
|
LL | * time to introduce a link [error]*/
| ^^^^^ there is no item named `error` in scope
| ^^^^^ no item named `error` in scope
|
= help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`

warning: unresolved link to `error`
--> $DIR/intra-links-warning.rs:64:30
|
LL | * time to introduce a link [error]
| ^^^^^ there is no item named `error` in scope
| ^^^^^ no item named `error` in scope
|
= help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`

Expand All @@ -70,7 +70,7 @@ LL | #[doc = "single line [error]"]

single line [error]
^^^^^
= note: there is no item named `error` in scope
= note: no item named `error` in scope
= help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`

warning: unresolved link to `error`
Expand All @@ -83,7 +83,7 @@ LL | #[doc = "single line with \"escaping\" [error]"]

single line with "escaping" [error]
^^^^^
= note: there is no item named `error` in scope
= note: no item named `error` in scope
= help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`

warning: unresolved link to `error`
Expand All @@ -98,46 +98,46 @@ LL | | /// [error]

[error]
^^^^^
= note: there is no item named `error` in scope
= note: no item named `error` in scope
= help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`

warning: unresolved link to `error1`
--> $DIR/intra-links-warning.rs:80:11
|
LL | /// docs [error1]
| ^^^^^^ there is no item named `error1` in scope
| ^^^^^^ no item named `error1` in scope
|
= help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`

warning: unresolved link to `error2`
--> $DIR/intra-links-warning.rs:82:11
|
LL | /// docs [error2]
| ^^^^^^ there is no item named `error2` in scope
| ^^^^^^ no item named `error2` in scope
|
= help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`

warning: unresolved link to `BarA`
--> $DIR/intra-links-warning.rs:21:10
|
LL | /// bar [BarA] bar
| ^^^^ there is no item named `BarA` in scope
| ^^^^ no item named `BarA` in scope
|
= help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`

warning: unresolved link to `BarB`
--> $DIR/intra-links-warning.rs:27:9
|
LL | * bar [BarB] bar
| ^^^^ there is no item named `BarB` in scope
| ^^^^ no item named `BarB` in scope
|
= help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`

warning: unresolved link to `BarC`
--> $DIR/intra-links-warning.rs:34:6
|
LL | bar [BarC] bar
| ^^^^ there is no item named `BarC` in scope
| ^^^^ no item named `BarC` in scope
|
= help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`

Expand All @@ -151,7 +151,7 @@ LL | #[doc = "Foo\nbar [BarD] bar\nbaz"]

bar [BarD] bar
^^^^
= note: there is no item named `BarD` in scope
= note: no item named `BarD` in scope
= help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`

warning: unresolved link to `BarF`
Expand All @@ -167,7 +167,7 @@ LL | f!("Foo\nbar [BarF] bar\nbaz");

bar [BarF] bar
^^^^
= note: there is no item named `BarF` in scope
= note: no item named `BarF` in scope
= help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
= note: this warning originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

Expand Down
2 changes: 1 addition & 1 deletion src/test/rustdoc-ui/lint-group.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ error: unresolved link to `error`
--> $DIR/lint-group.rs:9:29
|
LL | /// what up, let's make an [error]
| ^^^^^ there is no item named `error` in scope
| ^^^^^ no item named `error` in scope
|
note: the lint level is defined here
--> $DIR/lint-group.rs:7:9
Expand Down