Skip to content

Rollup of 8 pull requests #108701

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

Closed
wants to merge 21 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
cbf4d4e
Deny capturing late-bound non-lifetime param in anon const
compiler-errors Feb 28, 2023
45f694d
Remove pass initialization code
nikic Mar 1, 2023
655a810
Print NewPM passes
nikic Mar 1, 2023
4b01a1a
Fix another ICE in point_at_expr_source_of_inferred_type
compiler-errors Mar 2, 2023
23d4757
Fix array-size-threshold config deserialization error
Alexendoo Feb 28, 2023
729275d
Forbid the use of `#[target_feature]` on `main`
LeSeulArtichaut Mar 2, 2023
faebedf
Forbid the use of `#[target_feature]` on `start`
LeSeulArtichaut Mar 2, 2023
ff2c609
Match unmatched backticks in compiler/ that are part of rustdoc
est31 Mar 3, 2023
6df5ae4
Match unmatched backticks in comments in compiler/
est31 Mar 3, 2023
ef65890
Match end user facing unmatched backticks in compiler/
est31 Mar 3, 2023
5a02105
Rustdoc-ify LiteralKind note
est31 Mar 3, 2023
c54f061
Don't put integers into backticks during formatting
est31 Mar 3, 2023
a15abea
canonicalization
lcnr Feb 20, 2023
fdfff54
Rollup merge of #107981 - lcnr:canonicalization-uwu, r=compiler-errors
matthiaskrgr Mar 3, 2023
f8df7c4
Rollup merge of #108553 - compiler-errors:non-lt-late-bound-in-anon-c…
matthiaskrgr Mar 3, 2023
8ccbbbe
Rollup merge of #108599 - nikic:drop-init, r=cuviper
matthiaskrgr Mar 3, 2023
03a6420
Rollup merge of #108651 - LeSeulArtichaut:108645-target-feature-on-ma…
matthiaskrgr Mar 3, 2023
843a062
Rollup merge of #108667 - compiler-errors:issue-108664, r=estebank
matthiaskrgr Mar 3, 2023
2e256a4
Rollup merge of #108674 - flip1995:clippy_backport, r=Manishearth
matthiaskrgr Mar 3, 2023
281dc4e
Rollup merge of #108685 - est31:backticks_matchmaking, r=petrochenkov
matthiaskrgr Mar 3, 2023
38b0b9e
Rollup merge of #108694 - est31:backticks_matchmaking_comments, r=Nil…
matthiaskrgr Mar 3, 2023
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
Match end user facing unmatched backticks in compiler/
  • Loading branch information
est31 committed Mar 3, 2023
commit ef658907a5e88563e4b67a07ba1639c7bf58756f
2 changes: 1 addition & 1 deletion compiler/rustc_borrowck/src/diagnostics/region_errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -949,7 +949,7 @@ impl<'a, 'tcx> MirBorrowckCtxt<'a, 'tcx> {
.push_span_label(*span, "this has an implicit `'static` lifetime requirement");
multi_span.push_span_label(
ident.span,
"calling this method introduces the `impl`'s 'static` requirement",
"calling this method introduces the `impl`'s `'static` requirement",
);
err.subdiagnostic(RequireStaticErr::UsedImpl { multi_span });
err.span_suggestion_verbose(
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_const_eval/src/interpret/intrinsics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
assert_eq!(input_len, dest_len, "Return vector length must match input length");
assert!(
index < dest_len,
"Index `{}` must be in bounds of vector with length {}`",
"Index `{}` must be in bounds of vector with length `{}`",
index,
dest_len
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ impl<'mir, 'tcx> Checker<'mir, 'tcx> {

fn check_static(&mut self, def_id: DefId, span: Span) {
if self.tcx.is_thread_local_static(def_id) {
self.tcx.sess.delay_span_bug(span, "tls access is checked in `Rvalue::ThreadLocalRef");
self.tcx.sess.delay_span_bug(span, "tls access is checked in `Rvalue::ThreadLocalRef`");
}
self.check_op_spanned(ops::StaticAccess, span)
}
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_data_structures/src/stable_hasher/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ fn test_isize_compression() {
let hash_b = hash(&(b as isize, a as isize));
assert_ne!(
hash_a, hash_b,
"The hash stayed the same when permuting values `{a}` and `{b}!",
"The hash stayed the same when permuting values `{a}` and `{b}`!",
);
}

Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_expand/src/mbe/transcribe.rs
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ pub(super) fn transcribe<'a>(
}

// There should be no meta-var declarations in the invocation of a macro.
mbe::TokenTree::MetaVarDecl(..) => panic!("unexpected `TokenTree::MetaVarDecl"),
mbe::TokenTree::MetaVarDecl(..) => panic!("unexpected `TokenTree::MetaVarDecl`"),
}
}
}
Expand Down
8 changes: 4 additions & 4 deletions compiler/rustc_infer/locales/en-US.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ infer_subtype = ...so that the {$requirement ->
[if_else_different] `if` and `else` have incompatible types
[no_else] `if` missing an `else` returns `()`
[fn_main_correct_type] `main` function has the correct type
[fn_start_correct_type] #[start]` function has the correct type
[fn_start_correct_type] `#[start]` function has the correct type
[intristic_correct_type] intrinsic has the correct type
[method_correct_type] method receiver has the correct type
*[other] types are compatible
Expand All @@ -92,7 +92,7 @@ infer_subtype_2 = ...so that {$requirement ->
[if_else_different] `if` and `else` have incompatible types
[no_else] `if` missing an `else` returns `()`
[fn_main_correct_type] `main` function has the correct type
[fn_start_correct_type] #[start]` function has the correct type
[fn_start_correct_type] `#[start]` function has the correct type
[intristic_correct_type] intrinsic has the correct type
[method_correct_type] method receiver has the correct type
*[other] types are compatible
Expand Down Expand Up @@ -277,7 +277,7 @@ infer_tid_consider_borrowing = consider borrowing this type parameter in the tra
infer_tid_param_help = the lifetime requirements from the `impl` do not correspond to the requirements in the `trait`

infer_dtcs_has_lifetime_req_label = this has an implicit `'static` lifetime requirement
infer_dtcs_introduces_requirement = calling this method introduces the `impl`'s 'static` requirement
infer_dtcs_introduces_requirement = calling this method introduces the `impl`'s `'static` requirement
infer_dtcs_has_req_note = the used `impl` has a `'static` requirement
infer_dtcs_suggestion = consider relaxing the implicit `'static` requirement

Expand Down Expand Up @@ -313,7 +313,7 @@ infer_but_needs_to_satisfy = {$has_param_name ->
[false] ...and is required to live as long as `'static` here
}
.used_here = ...is used here...
.introduced_by_bound = 'static` lifetime requirement introduced by this bound
.introduced_by_bound = `'static` lifetime requirement introduced by this bound

infer_more_targeted = {$has_param_name ->
[true] `{$param_name}`
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_infer/src/infer/error_reporting/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1690,7 +1690,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
format!("{name} is defined in the current crate")
} else {
let crate_name = self.tcx.crate_name(defid.krate);
format!("{name} is defined in crate `{crate_name}")
format!("{name} is defined in crate `{crate_name}`")
};
diagnostic.span_note(def_span, msg);
};
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_interface/locales/en-US.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ interface_rustc_error_fatal =
fatal error triggered by #[rustc_error]

interface_rustc_error_unexpected_annotation =
unexpected annotation used with `#[rustc_error(...)]!
unexpected annotation used with `#[rustc_error(...)]`!

interface_failed_writing_file =
failed to write file {$path}: {$error}"
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_middle/src/ty/layout.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ impl IntegerExt for Integer {
if discr < fit {
bug!(
"Integer::repr_discr: `#[repr]` hint too small for \
discriminant range of enum `{}",
discriminant range of enum `{}`",
ty
)
}
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_mir_build/src/build/expr/as_constant.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ pub fn as_constant_inner<'tcx>(
ConstantKind::Ty(tcx.const_error_with_guaranteed(ty, guar))
}
Err(LitToConstError::TypeError) => {
bug!("encountered type error in `lit_to_mir_constant")
bug!("encountered type error in `lit_to_mir_constant`")
}
};

Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_session/locales/en-US.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ session_incorrect_cgu_reuse_type =
}`{$expected_reuse}`

session_cgu_not_recorded =
CGU-reuse for `{$cgu_user_name}` is (mangled: `{$cgu_name}`) was not recorded`
CGU-reuse for `{$cgu_user_name}` is (mangled: `{$cgu_name}`) was not recorded

session_feature_gate_error = {$explain}

Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_session/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2245,7 +2245,7 @@ pub fn parse_externs(
early_error(
error_format,
"the `-Z unstable-options` flag must also be passed to \
enable `--extern options",
enable `--extern` options",
);
}
for opt in opts.split(',') {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ note: the used `impl` has a `'static` requirement
LL | impl<T> MyTrait<T> for dyn ObjectTrait<T> {
| ^^^^^^^^^^^^^^ this has an implicit `'static` lifetime requirement
LL | fn use_self<K>(&self) -> &() { panic!() }
| -------- calling this method introduces the `impl`'s 'static` requirement
| -------- calling this method introduces the `impl`'s `'static` requirement
help: consider relaxing the implicit `'static` requirement
|
LL | impl<T> MyTrait<T> for dyn ObjectTrait<T> + '_ {
Expand All @@ -42,7 +42,7 @@ note: the used `impl` has a `'static` requirement
LL | impl dyn ObjectTrait {
| ^^^^^^^^^^^ this has an implicit `'static` lifetime requirement
LL | fn use_self(&self) -> &() { panic!() }
| -------- calling this method introduces the `impl`'s 'static` requirement
| -------- calling this method introduces the `impl`'s `'static` requirement
help: consider relaxing the implicit `'static` requirement
|
LL | impl dyn ObjectTrait + '_ {
Expand All @@ -65,7 +65,7 @@ note: the used `impl` has a `'static` requirement
--> $DIR/impl-on-dyn-trait-with-implicit-static-bound.rs:87:26
|
LL | fn use_self(&self) -> &() { panic!() }
| -------- calling this method introduces the `impl`'s 'static` requirement
| -------- calling this method introduces the `impl`'s `'static` requirement
...
LL | impl MyTrait for dyn ObjectTrait {}
| ^^^^^^^^^^^ this has an implicit `'static` lifetime requirement
Expand All @@ -91,7 +91,7 @@ note: the used `impl` has a `'static` requirement
--> $DIR/impl-on-dyn-trait-with-implicit-static-bound.rs:106:26
|
LL | fn use_self(&self) -> &() { panic!() }
| -------- calling this method introduces the `impl`'s 'static` requirement
| -------- calling this method introduces the `impl`'s `'static` requirement
...
LL | impl MyTrait for dyn ObjectTrait {}
| ^^^^^^^^^^^ this has an implicit `'static` lifetime requirement
Expand Down