rust/src/test/ui/explore-issue-38412.stderr
Dan Aloni 07e7823c01 pretty: trim paths of unique symbols
If a symbol name can only be imported from one place for a type, and
as long as it was not glob-imported anywhere in the current crate, we
can trim its printed path and print only the name.

This has wide implications on error messages with types, for example,
shortening `std::vec::Vec` to just `Vec`, as long as there is no other
`Vec` importable anywhere.

This adds a new '-Z trim-diagnostic-paths=false' option to control this
feature.

On the good path, with no diagnosis printed, we should try to avoid
issuing this query, so we need to prevent trimmed_def_paths query on
several cases.

This change also relies on a previous commit that differentiates
between `Debug` and `Display` on various rustc types, where the latter
is trimmed and presented to the user and the former is not.
2020-09-02 22:26:37 +03:00

140 lines
4.7 KiB
Plaintext

error[E0658]: use of unstable library feature 'unstable_undeclared'
--> $DIR/explore-issue-38412.rs:21:63
|
LL | let Record { a_stable_pub: _, a_unstable_declared_pub: _, a_unstable_undeclared_pub: _, .. } =
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: see issue #38412 <https://github.com/rust-lang/rust/issues/38412> for more information
= help: add `#![feature(unstable_undeclared)]` to the crate attributes to enable
error[E0658]: use of unstable library feature 'unstable_undeclared'
--> $DIR/explore-issue-38412.rs:30:5
|
LL | r.a_unstable_undeclared_pub;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: see issue #38412 <https://github.com/rust-lang/rust/issues/38412> for more information
= help: add `#![feature(unstable_undeclared)]` to the crate attributes to enable
error[E0616]: field `b_crate` of struct `Record` is private
--> $DIR/explore-issue-38412.rs:31:7
|
LL | r.b_crate;
| ^^^^^^^ private field
error[E0616]: field `c_mod` of struct `Record` is private
--> $DIR/explore-issue-38412.rs:32:7
|
LL | r.c_mod;
| ^^^^^ private field
error[E0616]: field `d_priv` of struct `Record` is private
--> $DIR/explore-issue-38412.rs:33:7
|
LL | r.d_priv;
| ^^^^^^ private field
error[E0658]: use of unstable library feature 'unstable_undeclared'
--> $DIR/explore-issue-38412.rs:37:5
|
LL | t.2;
| ^^^
|
= note: see issue #38412 <https://github.com/rust-lang/rust/issues/38412> for more information
= help: add `#![feature(unstable_undeclared)]` to the crate attributes to enable
error[E0616]: field `3` of struct `Tuple` is private
--> $DIR/explore-issue-38412.rs:38:7
|
LL | t.3;
| ^ private field
error[E0616]: field `4` of struct `Tuple` is private
--> $DIR/explore-issue-38412.rs:39:7
|
LL | t.4;
| ^ private field
error[E0616]: field `5` of struct `Tuple` is private
--> $DIR/explore-issue-38412.rs:40:7
|
LL | t.5;
| ^ private field
error[E0658]: use of unstable library feature 'unstable_undeclared'
--> $DIR/explore-issue-38412.rs:44:7
|
LL | r.unstable_undeclared_trait_method();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: see issue #38412 <https://github.com/rust-lang/rust/issues/38412> for more information
= help: add `#![feature(unstable_undeclared)]` to the crate attributes to enable
error[E0658]: use of unstable library feature 'unstable_undeclared'
--> $DIR/explore-issue-38412.rs:48:7
|
LL | r.unstable_undeclared();
| ^^^^^^^^^^^^^^^^^^^
|
= note: see issue #38412 <https://github.com/rust-lang/rust/issues/38412> for more information
= help: add `#![feature(unstable_undeclared)]` to the crate attributes to enable
error[E0624]: associated function `pub_crate` is private
--> $DIR/explore-issue-38412.rs:50:7
|
LL | r.pub_crate();
| ^^^^^^^^^ private associated function
error[E0624]: associated function `pub_mod` is private
--> $DIR/explore-issue-38412.rs:51:7
|
LL | r.pub_mod();
| ^^^^^^^ private associated function
error[E0624]: associated function `private` is private
--> $DIR/explore-issue-38412.rs:52:7
|
LL | r.private();
| ^^^^^^^ private associated function
error[E0658]: use of unstable library feature 'unstable_undeclared'
--> $DIR/explore-issue-38412.rs:57:7
|
LL | t.unstable_undeclared_trait_method();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: see issue #38412 <https://github.com/rust-lang/rust/issues/38412> for more information
= help: add `#![feature(unstable_undeclared)]` to the crate attributes to enable
error[E0658]: use of unstable library feature 'unstable_undeclared'
--> $DIR/explore-issue-38412.rs:61:7
|
LL | t.unstable_undeclared();
| ^^^^^^^^^^^^^^^^^^^
|
= note: see issue #38412 <https://github.com/rust-lang/rust/issues/38412> for more information
= help: add `#![feature(unstable_undeclared)]` to the crate attributes to enable
error[E0624]: associated function `pub_crate` is private
--> $DIR/explore-issue-38412.rs:63:7
|
LL | t.pub_crate();
| ^^^^^^^^^ private associated function
error[E0624]: associated function `pub_mod` is private
--> $DIR/explore-issue-38412.rs:64:7
|
LL | t.pub_mod();
| ^^^^^^^ private associated function
error[E0624]: associated function `private` is private
--> $DIR/explore-issue-38412.rs:65:7
|
LL | t.private();
| ^^^^^^^ private associated function
error: aborting due to 19 previous errors
Some errors have detailed explanations: E0616, E0624, E0658.
For more information about an error, try `rustc --explain E0616`.