Update tests for new TRPL chapter order
This commit is contained in:
parent
559a2d21b7
commit
d4275e08e7
57 changed files with 139 additions and 139 deletions
|
@ -364,7 +364,7 @@ fn report_unexpected_variant_res(
|
|||
.with_code(err_code);
|
||||
match res {
|
||||
Res::Def(DefKind::Fn | DefKind::AssocFn, _) if err_code == E0164 => {
|
||||
let patterns_url = "https://doc.rust-lang.org/book/ch18-00-patterns.html";
|
||||
let patterns_url = "https://doc.rust-lang.org/book/ch19-00-patterns.html";
|
||||
err.with_span_label(span, "`fn` calls are not allowed in patterns")
|
||||
.with_help(format!("for more information, visit {patterns_url}"))
|
||||
}
|
||||
|
|
|
@ -1206,7 +1206,7 @@ impl<'ast, 'ra: 'ast, 'tcx> LateResolutionVisitor<'_, 'ast, 'ra, 'tcx> {
|
|||
let PathSource::TupleStruct(_, _) = source else { return };
|
||||
let Some(Res::Def(DefKind::Fn, _)) = res else { return };
|
||||
err.primary_message("expected a pattern, found a function call");
|
||||
err.note("function calls are not allowed in patterns: <https://doc.rust-lang.org/book/ch18-00-patterns.html>");
|
||||
err.note("function calls are not allowed in patterns: <https://doc.rust-lang.org/book/ch19-00-patterns.html>");
|
||||
}
|
||||
|
||||
fn suggest_changing_type_to_const_param(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue