Skip to content

Rollup of 10 pull requests #64946

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 52 commits into from
Oct 1, 2019
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
2cb460e
Use `saturating_sub` where applicable
AnthonyMikh Sep 25, 2019
e9a93be
Use `max` instead of `if`s
AnthonyMikh Sep 25, 2019
4fc5650
Simplify Unicode-aware trimming
AnthonyMikh Sep 25, 2019
d6327e8
Use map + sum instead of fold for computing Unicode width
AnthonyMikh Sep 25, 2019
aef169b
Use Option::map_or where applicable
AnthonyMikh Sep 25, 2019
9b447e2
Unify order of variables in chained comparison
AnthonyMikh Sep 25, 2019
f93827f
Simplify `Emitter::fix_multispan_in_std_macros`
AnthonyMikh Sep 25, 2019
ea32862
Use `sort_by_key` rather than `sort_by`
AnthonyMikh Sep 25, 2019
7a0725f
Simplify `style_or_override`
AnthonyMikh Sep 25, 2019
75a7c27
Revert "Simplify Unicode-aware trimming"
AnthonyMikh Sep 26, 2019
3eba6c1
syntax: recover trailing `|` in or-patterns.
Centril Sep 29, 2019
d938a80
Fixed grammar for some `time` fn calls and a diagnostic.
alexreg Sep 30, 2019
fdd1a62
Added backticks for one diagnostic message.
alexreg Sep 30, 2019
8a4af2f
Fixed weird non-sequential indices for serialisation of `SourceFile` …
alexreg Sep 30, 2019
13b61b5
Fixed grammar in one diagnostic and blessed tests.
alexreg Sep 29, 2019
49c6c86
Fixed stylistic convention for one diagnostic and blessed tests.
alexreg Sep 30, 2019
33ed03f
Cleaned up a few doc comments in libfmt_macros.
alexreg Sep 30, 2019
96c8049
Remove legacy grammar
XAMPPRocky Sep 29, 2019
349259d
Stabilize macros in `extern` blocks
petrochenkov Aug 26, 2019
5ae38bb
Stabilize proc macros in type positions
petrochenkov Aug 27, 2019
535d474
syntax: Split `ast::Attribute` into container and inner parts
petrochenkov Aug 17, 2019
576c215
Add test for #50571
JohnTitor Sep 30, 2019
bc25746
Add test for #58022
JohnTitor Sep 30, 2019
9c73131
Add test for #58344
JohnTitor Sep 30, 2019
957986d
syntax: Support modern attribute syntax in the `meta` matcher
petrochenkov Aug 17, 2019
870b47f
typeck: silence unreachable code from await
davidtwco Sep 30, 2019
7dc953b
Simplify code for special case of annotation
AnthonyMikh Sep 30, 2019
6b6a79b
Simplify `EmitterWriter::get_multispan_max_line_num`
AnthonyMikh Sep 30, 2019
7b4c5c6
Simplify `EmitterWriter::get_max_line_num`
AnthonyMikh Sep 30, 2019
21724ed
Update doc comment for `style_or_override`
AnthonyMikh Sep 30, 2019
7a807c5
Simplify `EmitterWriter::emit_suggestion_default`
AnthonyMikh Sep 30, 2019
9d73176
Remove redundant `.iter_mut()`
AnthonyMikh Sep 30, 2019
55b5428
Simplify a conditional in `collect_annotations`
AnthonyMikh Sep 30, 2019
6ea4a52
Address review comments
petrochenkov Sep 30, 2019
bb44288
Use pattern matching instead of indexing tuples
AnthonyMikh Sep 30, 2019
04fa9b1
async/await: improve obligation errors
davidtwco Sep 25, 2019
e5db5b3
(fmt) remove trailing whitespaces
AnthonyMikh Sep 30, 2019
61bc38e
Fix errors
AnthonyMikh Sep 30, 2019
515262c
Ascript type explicitly
AnthonyMikh Sep 30, 2019
fdce416
Hint type for `.sum()`
AnthonyMikh Oct 1, 2019
50c2a58
Fix borrowck errors
AnthonyMikh Oct 1, 2019
13e9b3d
Deduplicate closure type errors
estebank Oct 1, 2019
64130fd
Rollup merge of #63674 - petrochenkov:meta2, r=Centril
Centril Oct 1, 2019
3bd34e0
Rollup merge of #63931 - petrochenkov:stabmac, r=Centril
Centril Oct 1, 2019
f45de9a
Rollup merge of #64887 - Centril:recover-trailing-vert, r=estebank
Centril Oct 1, 2019
25f774a
Rollup merge of #64895 - davidtwco:issue-64130-async-error-definition…
Centril Oct 1, 2019
b8c5d3a
Rollup merge of #64896 - XAMPPRocky:remove-grammar, r=Centril
Centril Oct 1, 2019
24a84fa
Rollup merge of #64907 - alexreg:tidy-up, r=Mark-Simulacrum
Centril Oct 1, 2019
dc1c1fe
Rollup merge of #64928 - JohnTitor:add-some-tests, r=Centril
Centril Oct 1, 2019
f4aa29f
Rollup merge of #64930 - davidtwco:issue-61798-diverging-await, r=pet…
Centril Oct 1, 2019
5c6a8ee
Rollup merge of #64935 - AnthonyMikh:librustc_errors/emmiter__code-cl…
Centril Oct 1, 2019
46bf6ad
Rollup merge of #64937 - estebank:dedup-closure-err, r=Centril
Centril Oct 1, 2019
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
6 changes: 3 additions & 3 deletions src/libfmt_macros/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ impl<'a> Parser<'a> {
&self.input[start..self.input.len()]
}

/// Parses an Argument structure, or what's contained within braces inside the format string
/// Parses an `Argument` structure, or what's contained within braces inside the format string.
fn argument(&mut self) -> Argument<'a> {
let pos = self.position();
let format = self.format();
Expand Down Expand Up @@ -464,7 +464,7 @@ impl<'a> Parser<'a> {
}

/// Parses a format specifier at the current position, returning all of the
/// relevant information in the FormatSpec struct.
/// relevant information in the `FormatSpec` struct.
fn format(&mut self) -> FormatSpec<'a> {
let mut spec = FormatSpec {
fill: None,
Expand Down Expand Up @@ -571,7 +571,7 @@ impl<'a> Parser<'a> {
spec
}

/// Parses a Count parameter at the current position. This does not check
/// Parses a `Count` parameter at the current position. This does not check
/// for 'CountIsNextParam' because that is only used in precision, not
/// width.
fn count(&mut self, start: usize) -> (Count, Option<InnerSpan>) {
Expand Down
16 changes: 8 additions & 8 deletions src/librustc_interface/passes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ pub fn register_plugins<'a>(
rustc_incremental::prepare_session_directory(sess, &crate_name, disambiguator);

if sess.opts.incremental.is_some() {
time(sess, "garbage collect incremental cache directory", || {
time(sess, "garbage-collect incremental cache directory", || {
if let Err(e) = rustc_incremental::garbage_collect_session_directories(sess) {
warn!(
"Error while trying to garbage collect incremental \
Expand Down Expand Up @@ -318,7 +318,7 @@ fn configure_and_expand_inner<'a>(
crate_loader: &'a mut CrateLoader<'a>,
plugin_info: PluginInfo,
) -> Result<(ast::Crate, Resolver<'a>)> {
time(sess, "pre ast expansion lint checks", || {
time(sess, "pre-AST-expansion lint checks", || {
lint::check_ast_crate(
sess,
&krate,
Expand Down Expand Up @@ -536,8 +536,8 @@ pub fn lower_to_hir(
dep_graph: &DepGraph,
krate: &ast::Crate,
) -> Result<hir::map::Forest> {
// Lower ast -> hir
let hir_forest = time(sess, "lowering ast -> hir", || {
// Lower AST to HIR.
let hir_forest = time(sess, "lowering AST -> HIR", || {
let hir_crate = lower_crate(sess, cstore, &dep_graph, &krate, resolver);

if sess.opts.debugging_opts.hir_stats {
Expand Down Expand Up @@ -757,7 +757,7 @@ pub fn prepare_outputs(
if !only_dep_info {
if let Some(ref dir) = compiler.output_dir {
if fs::create_dir_all(dir).is_err() {
sess.err("failed to find or create the directory specified by --out-dir");
sess.err("failed to find or create the directory specified by `--out-dir`");
return Err(ErrorReported);
}
}
Expand Down Expand Up @@ -830,8 +830,8 @@ pub fn create_global_ctxt(
let global_ctxt: Option<GlobalCtxt<'_>>;
let arenas = AllArenas::new();

// Construct the HIR map
let hir_map = time(sess, "indexing hir", || {
// Construct the HIR map.
let hir_map = time(sess, "indexing HIR", || {
hir::map::map_crate(sess, cstore, &mut hir_forest, &defs)
});

Expand Down Expand Up @@ -942,7 +942,7 @@ fn analysis(tcx: TyCtxt<'_>, cnum: CrateNum) -> Result<()> {
tcx.par_body_owners(|def_id| tcx.ensure().mir_borrowck(def_id));
});

time(sess, "dumping chalk-like clauses", || {
time(sess, "dumping Chalk-like clauses", || {
rustc_traits::lowering::dump_program_clauses(tcx);
});

Expand Down
4 changes: 2 additions & 2 deletions src/librustc_typeck/astconv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -952,8 +952,8 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
tcx.sess.span_warn(
span,
"default bound relaxed for a type parameter, but \
this does nothing because the given bound is not \
a default. Only `?Sized` is supported",
this does nothing because the given bound is not \
a default; only `?Sized` is supported",
);
}
}
Expand Down
34 changes: 19 additions & 15 deletions src/librustc_typeck/check/method/suggest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -631,26 +631,30 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
}
}

fn suggest_valid_traits(&self,
err: &mut DiagnosticBuilder<'_>,
valid_out_of_scope_traits: Vec<DefId>) -> bool {
fn suggest_valid_traits(
&self,
err: &mut DiagnosticBuilder<'_>,
valid_out_of_scope_traits: Vec<DefId>,
) -> bool {
if !valid_out_of_scope_traits.is_empty() {
let mut candidates = valid_out_of_scope_traits;
candidates.sort();
candidates.dedup();
err.help("items from traits can only be used if the trait is in scope");
let msg = format!("the following {traits_are} implemented but not in scope, \
perhaps add a `use` for {one_of_them}:",
traits_are = if candidates.len() == 1 {
"trait is"
} else {
"traits are"
},
one_of_them = if candidates.len() == 1 {
"it"
} else {
"one of them"
});
let msg = format!(
"the following {traits_are} implemented but not in scope; \
perhaps add a `use` for {one_of_them}:",
traits_are = if candidates.len() == 1 {
"trait is"
} else {
"traits are"
},
one_of_them = if candidates.len() == 1 {
"it"
} else {
"one of them"
},
);

self.suggest_use_candidates(err, msg, candidates);
true
Expand Down
2 changes: 1 addition & 1 deletion src/libsyntax/parse/lexer/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ impl<'a> StringReader<'a> {
source_file: Lrc<syntax_pos::SourceFile>,
override_span: Option<Span>) -> Self {
if source_file.src.is_none() {
sess.span_diagnostic.bug(&format!("Cannot lex source_file without source: {}",
sess.span_diagnostic.bug(&format!("cannot lex `source_file` without source: {}",
source_file.name));
}

Expand Down
31 changes: 15 additions & 16 deletions src/libsyntax_pos/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -884,7 +884,7 @@ pub struct OffsetOverflowError;
/// A single source in the `SourceMap`.
#[derive(Clone)]
pub struct SourceFile {
/// The name of the file that the source came from, source that doesn't
/// The name of the file that the source came from. Source that doesn't
/// originate from files has names between angle brackets by convention
/// (e.g., `<anon>`).
pub name: FileName,
Expand Down Expand Up @@ -922,9 +922,9 @@ impl Encodable for SourceFile {
s.emit_struct_field("name", 0, |s| self.name.encode(s))?;
s.emit_struct_field("name_was_remapped", 1, |s| self.name_was_remapped.encode(s))?;
s.emit_struct_field("src_hash", 2, |s| self.src_hash.encode(s))?;
s.emit_struct_field("start_pos", 4, |s| self.start_pos.encode(s))?;
s.emit_struct_field("end_pos", 5, |s| self.end_pos.encode(s))?;
s.emit_struct_field("lines", 6, |s| {
s.emit_struct_field("start_pos", 3, |s| self.start_pos.encode(s))?;
s.emit_struct_field("end_pos", 4, |s| self.end_pos.encode(s))?;
s.emit_struct_field("lines", 5, |s| {
let lines = &self.lines[..];
// Store the length.
s.emit_u32(lines.len() as u32)?;
Expand Down Expand Up @@ -970,13 +970,13 @@ impl Encodable for SourceFile {

Ok(())
})?;
s.emit_struct_field("multibyte_chars", 7, |s| {
s.emit_struct_field("multibyte_chars", 6, |s| {
self.multibyte_chars.encode(s)
})?;
s.emit_struct_field("non_narrow_chars", 8, |s| {
s.emit_struct_field("non_narrow_chars", 7, |s| {
self.non_narrow_chars.encode(s)
})?;
s.emit_struct_field("name_hash", 9, |s| {
s.emit_struct_field("name_hash", 8, |s| {
self.name_hash.encode(s)
})
})
Expand All @@ -985,17 +985,16 @@ impl Encodable for SourceFile {

impl Decodable for SourceFile {
fn decode<D: Decoder>(d: &mut D) -> Result<SourceFile, D::Error> {

d.read_struct("SourceFile", 8, |d| {
let name: FileName = d.read_struct_field("name", 0, |d| Decodable::decode(d))?;
let name_was_remapped: bool =
d.read_struct_field("name_was_remapped", 1, |d| Decodable::decode(d))?;
let src_hash: u128 =
d.read_struct_field("src_hash", 2, |d| Decodable::decode(d))?;
let start_pos: BytePos =
d.read_struct_field("start_pos", 4, |d| Decodable::decode(d))?;
let end_pos: BytePos = d.read_struct_field("end_pos", 5, |d| Decodable::decode(d))?;
let lines: Vec<BytePos> = d.read_struct_field("lines", 6, |d| {
d.read_struct_field("start_pos", 3, |d| Decodable::decode(d))?;
let end_pos: BytePos = d.read_struct_field("end_pos", 4, |d| Decodable::decode(d))?;
let lines: Vec<BytePos> = d.read_struct_field("lines", 5, |d| {
let num_lines: u32 = Decodable::decode(d)?;
let mut lines = Vec::with_capacity(num_lines as usize);

Expand Down Expand Up @@ -1024,18 +1023,18 @@ impl Decodable for SourceFile {
Ok(lines)
})?;
let multibyte_chars: Vec<MultiByteChar> =
d.read_struct_field("multibyte_chars", 7, |d| Decodable::decode(d))?;
d.read_struct_field("multibyte_chars", 6, |d| Decodable::decode(d))?;
let non_narrow_chars: Vec<NonNarrowChar> =
d.read_struct_field("non_narrow_chars", 8, |d| Decodable::decode(d))?;
d.read_struct_field("non_narrow_chars", 7, |d| Decodable::decode(d))?;
let name_hash: u128 =
d.read_struct_field("name_hash", 9, |d| Decodable::decode(d))?;
d.read_struct_field("name_hash", 8, |d| Decodable::decode(d))?;
Ok(SourceFile {
name,
name_was_remapped,
unmapped_path: None,
// `crate_of_origin` has to be set by the importer.
// This value matches up with rustc::hir::def_id::INVALID_CRATE.
// That constant is not available here unfortunately :(
// This value matches up with `rustc::hir::def_id::INVALID_CRATE`.
// That constant is not available here, unfortunately.
crate_of_origin: std::u32::MAX - 1,
start_pos,
end_pos,
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/coherence/coherence_inherent.old.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ LL | s.the_fn();
| ^^^^^^ method not found in `&Lib::TheStruct`
|
= help: items from traits can only be used if the trait is in scope
= note: the following trait is implemented but not in scope, perhaps add a `use` for it:
= note: the following trait is implemented but not in scope; perhaps add a `use` for it:
`use Lib::TheTrait;`

error: aborting due to previous error
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/coherence/coherence_inherent.re.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ LL | s.the_fn();
| ^^^^^^ method not found in `&Lib::TheStruct`
|
= help: items from traits can only be used if the trait is in scope
= note: the following trait is implemented but not in scope, perhaps add a `use` for it:
= note: the following trait is implemented but not in scope; perhaps add a `use` for it:
`use Lib::TheTrait;`

error: aborting due to previous error
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/coherence/coherence_inherent_cc.old.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ LL | s.the_fn();
| ^^^^^^ method not found in `&coherence_inherent_cc_lib::TheStruct`
|
= help: items from traits can only be used if the trait is in scope
= note: the following trait is implemented but not in scope, perhaps add a `use` for it:
= note: the following trait is implemented but not in scope; perhaps add a `use` for it:
`use coherence_inherent_cc_lib::TheTrait;`

error: aborting due to previous error
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/coherence/coherence_inherent_cc.re.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ LL | s.the_fn();
| ^^^^^^ method not found in `&coherence_inherent_cc_lib::TheStruct`
|
= help: items from traits can only be used if the trait is in scope
= note: the following trait is implemented but not in scope, perhaps add a `use` for it:
= note: the following trait is implemented but not in scope; perhaps add a `use` for it:
`use coherence_inherent_cc_lib::TheTrait;`

error: aborting due to previous error
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/hygiene/no_implicit_prelude.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ LL | ().clone()
| ^^^^^ method not found in `()`
|
= help: items from traits can only be used if the trait is in scope
= note: the following trait is implemented but not in scope, perhaps add a `use` for it:
= note: the following trait is implemented but not in scope; perhaps add a `use` for it:
`use std::clone::Clone;`

error: aborting due to 3 previous errors
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/hygiene/trait_items.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ LL | pub macro m() { ().f() }
| ^ method not found in `()`
|
= help: items from traits can only be used if the trait is in scope
= note: the following trait is implemented but not in scope, perhaps add a `use` for it:
= note: the following trait is implemented but not in scope; perhaps add a `use` for it:
`use foo::T;`

error: aborting due to previous error
Expand Down
12 changes: 6 additions & 6 deletions src/test/ui/impl-trait/no-method-suggested-traits.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ LL | 1u32.method();
| ^^^^^^ method not found in `u32`
|
= help: items from traits can only be used if the trait is in scope
help: the following traits are implemented but not in scope, perhaps add a `use` for one of them:
help: the following traits are implemented but not in scope; perhaps add a `use` for one of them:
|
LL | use foo::Bar;
|
Expand All @@ -23,7 +23,7 @@ LL | std::rc::Rc::new(&mut Box::new(&1u32)).method();
| ^^^^^^ method not found in `std::rc::Rc<&mut std::boxed::Box<&u32>>`
|
= help: items from traits can only be used if the trait is in scope
help: the following traits are implemented but not in scope, perhaps add a `use` for one of them:
help: the following traits are implemented but not in scope; perhaps add a `use` for one of them:
|
LL | use foo::Bar;
|
Expand All @@ -41,7 +41,7 @@ LL | 'a'.method();
| ^^^^^^ method not found in `char`
|
= help: items from traits can only be used if the trait is in scope
help: the following trait is implemented but not in scope, perhaps add a `use` for it:
help: the following trait is implemented but not in scope; perhaps add a `use` for it:
|
LL | use foo::Bar;
|
Expand All @@ -61,7 +61,7 @@ LL | std::rc::Rc::new(&mut Box::new(&'a')).method();
| ^^^^^^ method not found in `std::rc::Rc<&mut std::boxed::Box<&char>>`
|
= help: items from traits can only be used if the trait is in scope
help: the following trait is implemented but not in scope, perhaps add a `use` for it:
help: the following trait is implemented but not in scope; perhaps add a `use` for it:
|
LL | use foo::Bar;
|
Expand All @@ -73,7 +73,7 @@ LL | 1i32.method();
| ^^^^^^ method not found in `i32`
|
= help: items from traits can only be used if the trait is in scope
help: the following trait is implemented but not in scope, perhaps add a `use` for it:
help: the following trait is implemented but not in scope; perhaps add a `use` for it:
|
LL | use no_method_suggested_traits::foo::PubPub;
|
Expand All @@ -85,7 +85,7 @@ LL | std::rc::Rc::new(&mut Box::new(&1i32)).method();
| ^^^^^^ method not found in `std::rc::Rc<&mut std::boxed::Box<&i32>>`
|
= help: items from traits can only be used if the trait is in scope
help: the following trait is implemented but not in scope, perhaps add a `use` for it:
help: the following trait is implemented but not in scope; perhaps add a `use` for it:
|
LL | use no_method_suggested_traits::foo::PubPub;
|
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/issues/issue-10465.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ LL | b.foo();
| ^^^ method not found in `&b::B`
|
= help: items from traits can only be used if the trait is in scope
= note: the following trait is implemented but not in scope, perhaps add a `use` for it:
= note: the following trait is implemented but not in scope; perhaps add a `use` for it:
`use a::A;`

error: aborting due to previous error
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/issues/issue-37534.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ help: possible better candidate is found in another module, you can import it in
LL | use std::hash::Hash;
|

warning: default bound relaxed for a type parameter, but this does nothing because the given bound is not a default. Only `?Sized` is supported
warning: default bound relaxed for a type parameter, but this does nothing because the given bound is not a default; only `?Sized` is supported
--> $DIR/issue-37534.rs:1:12
|
LL | struct Foo<T: ?Hash> { }
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/issues/issue-39175.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ LL | Command::new("echo").arg("hello").exec();
| ^^^^ method not found in `&mut std::process::Command`
|
= help: items from traits can only be used if the trait is in scope
help: the following trait is implemented but not in scope, perhaps add a `use` for it:
help: the following trait is implemented but not in scope; perhaps add a `use` for it:
|
LL | use std::os::unix::process::CommandExt;
|
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/issues/issue-43189.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ LL | ().a();
| ^ method not found in `()`
|
= help: items from traits can only be used if the trait is in scope
help: the following trait is implemented but not in scope, perhaps add a `use` for it:
help: the following trait is implemented but not in scope; perhaps add a `use` for it:
|
LL | use xcrate_issue_43189_b::xcrate_issue_43189_a::A;
|
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/maybe-bounds-where.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ error[E0203]: type parameter has more than one relaxed default bound, only one i
LL | struct S5<T>(*const T) where T: ?Trait<'static> + ?Sized;
| ^

warning: default bound relaxed for a type parameter, but this does nothing because the given bound is not a default. Only `?Sized` is supported
warning: default bound relaxed for a type parameter, but this does nothing because the given bound is not a default; only `?Sized` is supported
--> $DIR/maybe-bounds-where.rs:15:11
|
LL | struct S5<T>(*const T) where T: ?Trait<'static> + ?Sized;
Expand Down
Loading