Auto merge of #81718 - m-ou-se:rollup-3ftbymt, r=m-ou-se
Rollup of 5 pull requests Successful merges: - #80394 (make const_err a future incompat lint) - #81532 (Remove incorrect `delay_span_bug`) - #81692 (Update clippy) - #81715 (Reduce tab formatting assertions to debug only) - #81716 (Fix non-existent-field ICE for generic fields.) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
This commit is contained in:
commit
120b2a704a
149 changed files with 1514 additions and 412 deletions
|
@ -645,7 +645,7 @@ impl EmitterWriter {
|
|||
margin: Margin,
|
||||
) {
|
||||
// Tabs are assumed to have been replaced by spaces in calling code.
|
||||
assert!(!source_string.contains('\t'));
|
||||
debug_assert!(!source_string.contains('\t'));
|
||||
let line_len = source_string.len();
|
||||
// Create the source line we will highlight.
|
||||
let left = margin.left(line_len);
|
||||
|
|
|
@ -15,7 +15,7 @@ impl StyledBuffer {
|
|||
|
||||
pub fn render(&self) -> Vec<Vec<StyledString>> {
|
||||
// Tabs are assumed to have been replaced by spaces in calling code.
|
||||
assert!(self.text.iter().all(|r| !r.contains(&'\t')));
|
||||
debug_assert!(self.text.iter().all(|r| !r.contains(&'\t')));
|
||||
|
||||
let mut output: Vec<Vec<StyledString>> = vec![];
|
||||
let mut styled_vec: Vec<StyledString> = vec![];
|
||||
|
|
|
@ -255,6 +255,10 @@ declare_lint! {
|
|||
pub CONST_ERR,
|
||||
Deny,
|
||||
"constant evaluation encountered erroneous expression",
|
||||
@future_incompatible = FutureIncompatibleInfo {
|
||||
reference: "issue #71800 <https://github.com/rust-lang/rust/issues/71800>",
|
||||
edition: None,
|
||||
};
|
||||
report_in_external_macro
|
||||
}
|
||||
|
||||
|
|
|
@ -203,7 +203,6 @@ pub(super) fn check_fn<'a, 'tcx>(
|
|||
// possible cases.
|
||||
fcx.check_expr(&body.value);
|
||||
fcx.require_type_is_sized(declared_ret_ty, decl.output.span(), traits::SizedReturnType);
|
||||
tcx.sess.delay_span_bug(decl.output.span(), "`!Sized` return type");
|
||||
} else {
|
||||
fcx.require_type_is_sized(declared_ret_ty, decl.output.span(), traits::SizedReturnType);
|
||||
fcx.check_return_expr(&body.value);
|
||||
|
|
|
@ -1974,7 +1974,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
|
|||
|
||||
field_path.push(candidate_field.ident.normalize_to_macros_2_0());
|
||||
let field_ty = candidate_field.ty(self.tcx, subst);
|
||||
if let Some((nested_fields, _)) = self.get_field_candidates(span, &field_ty) {
|
||||
if let Some((nested_fields, subst)) = self.get_field_candidates(span, &field_ty) {
|
||||
for field in nested_fields.iter() {
|
||||
let ident = field.ident.normalize_to_macros_2_0();
|
||||
if ident == target_field {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue