Skip to content

Commit d4275e0

Browse files
committedNov 23, 2024
Update tests for new TRPL chapter order
1 parent 559a2d2 commit d4275e0

File tree

57 files changed

+139
-139
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+139
-139
lines changed
 

‎compiler/rustc_hir_typeck/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ fn report_unexpected_variant_res(
364364
.with_code(err_code);
365365
match res {
366366
Res::Def(DefKind::Fn | DefKind::AssocFn, _) if err_code == E0164 => {
367-
let patterns_url = "https://doc.rust-lang.org/book/ch18-00-patterns.html";
367+
let patterns_url = "https://doc.rust-lang.org/book/ch19-00-patterns.html";
368368
err.with_span_label(span, "`fn` calls are not allowed in patterns")
369369
.with_help(format!("for more information, visit {patterns_url}"))
370370
}

‎compiler/rustc_resolve/src/late/diagnostics.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1206,7 +1206,7 @@ impl<'ast, 'ra: 'ast, 'tcx> LateResolutionVisitor<'_, 'ast, 'ra, 'tcx> {
12061206
let PathSource::TupleStruct(_, _) = source else { return };
12071207
let Some(Res::Def(DefKind::Fn, _)) = res else { return };
12081208
err.primary_message("expected a pattern, found a function call");
1209-
err.note("function calls are not allowed in patterns: <https://doc.rust-lang.org/book/ch18-00-patterns.html>");
1209+
err.note("function calls are not allowed in patterns: <https://doc.rust-lang.org/book/ch19-00-patterns.html>");
12101210
}
12111211

12121212
fn suggest_changing_type_to_const_param(

0 commit comments

Comments
 (0)
Please sign in to comment.