mirror of
https://github.com/rust-lang/rust.git
synced 2024-10-30 05:51:58 +00:00
Auto merge of #89386 - ehuss:rollup-idf4dmj, r=ehuss
Rollup of 13 pull requests Successful merges: - #87428 (Fix union keyword highlighting in rustdoc HTML sources) - #88412 (Remove ignore-tidy-undocumented-unsafe from core::slice::sort) - #89098 (Fix generics where bounds order) - #89232 (Improve help for recursion limit errors) - #89294 (⬆️ rust-analyzer) - #89297 (Remove Never variant from clean::Type enum) - #89311 (Add unit assignment to MIR for `asm!()`) - #89313 (PassWrapper: handle function rename from upstream D36850) - #89315 (Clarify that `CString::from_vec_unchecked` appends 0 byte.) - #89335 (Optimize is_sorted for Range and RangeInclusive) - #89366 (rustdoc: Remove lazy_static dependency) - #89377 (Update cargo) - #89378 (Update books) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
This commit is contained in:
commit
30acf6def3
@ -633,14 +633,18 @@ impl<'a, 'b> MacroExpander<'a, 'b> {
|
||||
|
||||
fn error_recursion_limit_reached(&mut self) {
|
||||
let expn_data = self.cx.current_expansion.id.expn_data();
|
||||
let suggested_limit = self.cx.ecfg.recursion_limit * 2;
|
||||
let suggested_limit = match self.cx.ecfg.recursion_limit {
|
||||
Limit(0) => Limit(2),
|
||||
limit => limit * 2,
|
||||
};
|
||||
self.cx
|
||||
.struct_span_err(
|
||||
expn_data.call_site,
|
||||
&format!("recursion limit reached while expanding `{}`", expn_data.kind.descr()),
|
||||
)
|
||||
.help(&format!(
|
||||
"consider adding a `#![recursion_limit=\"{}\"]` attribute to your crate (`{}`)",
|
||||
"consider increasing the recursion limit by adding a \
|
||||
`#![recursion_limit = \"{}\"]` attribute to your crate (`{}`)",
|
||||
suggested_limit, self.cx.ecfg.crate_name,
|
||||
))
|
||||
.emit();
|
||||
|
@ -1572,7 +1572,11 @@ extern "C" bool
|
||||
LLVMRustPrepareThinLTOResolveWeak(const LLVMRustThinLTOData *Data, LLVMModuleRef M) {
|
||||
Module &Mod = *unwrap(M);
|
||||
const auto &DefinedGlobals = Data->ModuleToDefinedGVSummaries.lookup(Mod.getModuleIdentifier());
|
||||
#if LLVM_VERSION_GE(14, 0)
|
||||
thinLTOFinalizeInModule(Mod, DefinedGlobals, /*PropagateAttrs=*/true);
|
||||
#else
|
||||
thinLTOResolvePrevailingInModule(Mod, DefinedGlobals);
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -449,8 +449,11 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
|
||||
})
|
||||
.collect();
|
||||
|
||||
let destination = this.cfg.start_new_block();
|
||||
if !options.contains(InlineAsmOptions::NORETURN) {
|
||||
this.cfg.push_assign_unit(block, source_info, destination, this.tcx);
|
||||
}
|
||||
|
||||
let destination_block = this.cfg.start_new_block();
|
||||
this.cfg.terminate(
|
||||
block,
|
||||
source_info,
|
||||
@ -462,11 +465,11 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
|
||||
destination: if options.contains(InlineAsmOptions::NORETURN) {
|
||||
None
|
||||
} else {
|
||||
Some(destination)
|
||||
Some(destination_block)
|
||||
},
|
||||
},
|
||||
);
|
||||
destination.unit()
|
||||
destination_block.unit()
|
||||
}
|
||||
|
||||
// These cases don't actually need a destination
|
||||
|
@ -5,7 +5,7 @@ use rustc_hir as hir;
|
||||
use rustc_infer::infer::InferCtxt;
|
||||
use rustc_middle::ty::{self, TraitRef, Ty, TyCtxt, WithConstness};
|
||||
use rustc_middle::ty::{ToPredicate, TypeFoldable};
|
||||
use rustc_session::DiagnosticMessageId;
|
||||
use rustc_session::{DiagnosticMessageId, Limit};
|
||||
use rustc_span::def_id::LOCAL_CRATE;
|
||||
use rustc_span::Span;
|
||||
|
||||
@ -217,7 +217,10 @@ impl<'a, 'tcx> Autoderef<'a, 'tcx> {
|
||||
|
||||
pub fn report_autoderef_recursion_limit_error<'tcx>(tcx: TyCtxt<'tcx>, span: Span, ty: Ty<'tcx>) {
|
||||
// We've reached the recursion limit, error gracefully.
|
||||
let suggested_limit = tcx.recursion_limit() * 2;
|
||||
let suggested_limit = match tcx.recursion_limit() {
|
||||
Limit(0) => Limit(2),
|
||||
limit => limit * 2,
|
||||
};
|
||||
let msg = format!("reached the recursion limit while auto-dereferencing `{:?}`", ty);
|
||||
let error_id = (DiagnosticMessageId::ErrorId(55), Some(span), msg);
|
||||
let fresh = tcx.sess.one_time_diagnostics.borrow_mut().insert(error_id);
|
||||
@ -231,7 +234,8 @@ pub fn report_autoderef_recursion_limit_error<'tcx>(tcx: TyCtxt<'tcx>, span: Spa
|
||||
)
|
||||
.span_label(span, "deref recursion limit reached")
|
||||
.help(&format!(
|
||||
"consider adding a `#![recursion_limit=\"{}\"]` attribute to your crate (`{}`)",
|
||||
"consider increasing the recursion limit by adding a \
|
||||
`#![recursion_limit = \"{}\"]` attribute to your crate (`{}`)",
|
||||
suggested_limit,
|
||||
tcx.crate_name(LOCAL_CRATE),
|
||||
))
|
||||
|
@ -22,6 +22,7 @@ use rustc_middle::ty::{
|
||||
Infer, InferTy, ToPredicate, Ty, TyCtxt, TypeFoldable, WithConstness,
|
||||
};
|
||||
use rustc_middle::ty::{TypeAndMut, TypeckResults};
|
||||
use rustc_session::Limit;
|
||||
use rustc_span::def_id::LOCAL_CRATE;
|
||||
use rustc_span::symbol::{kw, sym, Ident, Symbol};
|
||||
use rustc_span::{BytePos, DesugaringKind, ExpnKind, ForLoopLoc, MultiSpan, Span, DUMMY_SP};
|
||||
@ -2426,10 +2427,13 @@ impl<'a, 'tcx> InferCtxtExt<'tcx> for InferCtxt<'a, 'tcx> {
|
||||
}
|
||||
|
||||
fn suggest_new_overflow_limit(&self, err: &mut DiagnosticBuilder<'_>) {
|
||||
let current_limit = self.tcx.recursion_limit();
|
||||
let suggested_limit = current_limit * 2;
|
||||
let suggested_limit = match self.tcx.recursion_limit() {
|
||||
Limit(0) => Limit(2),
|
||||
limit => limit * 2,
|
||||
};
|
||||
err.help(&format!(
|
||||
"consider adding a `#![recursion_limit=\"{}\"]` attribute to your crate (`{}`)",
|
||||
"consider increasing the recursion limit by adding a \
|
||||
`#![recursion_limit = \"{}\"]` attribute to your crate (`{}`)",
|
||||
suggested_limit,
|
||||
self.tcx.crate_name(LOCAL_CRATE),
|
||||
));
|
||||
|
@ -672,6 +672,11 @@ impl<A: Step> Iterator for ops::Range<A> {
|
||||
self.next_back()
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn is_sorted(self) -> bool {
|
||||
true
|
||||
}
|
||||
|
||||
#[inline]
|
||||
#[doc(hidden)]
|
||||
unsafe fn __iterator_get_unchecked(&mut self, idx: usize) -> Self::Item
|
||||
@ -1095,6 +1100,11 @@ impl<A: Step> Iterator for ops::RangeInclusive<A> {
|
||||
fn max(mut self) -> Option<A> {
|
||||
self.next_back()
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn is_sorted(self) -> bool {
|
||||
true
|
||||
}
|
||||
}
|
||||
|
||||
#[stable(feature = "inclusive_range", since = "1.26.0")]
|
||||
|
@ -6,8 +6,6 @@
|
||||
//! Unstable sorting is compatible with libcore because it doesn't allocate memory, unlike our
|
||||
//! stable sorting implementation.
|
||||
|
||||
// ignore-tidy-undocumented-unsafe
|
||||
|
||||
use crate::cmp;
|
||||
use crate::mem::{self, MaybeUninit};
|
||||
use crate::ptr;
|
||||
@ -291,6 +289,9 @@ where
|
||||
} else if start_r < end_r {
|
||||
block_l = rem;
|
||||
} else {
|
||||
// There were the same number of elements to switch on both blocks during the last
|
||||
// iteration, so there are no remaining elements on either block. Cover the remaining
|
||||
// items with roughly equally-sized blocks.
|
||||
block_l = rem / 2;
|
||||
block_r = rem - block_l;
|
||||
}
|
||||
@ -437,6 +438,17 @@ where
|
||||
// Move its remaining out-of-order elements to the far right.
|
||||
debug_assert_eq!(width(l, r), block_l);
|
||||
while start_l < end_l {
|
||||
// remaining-elements-safety
|
||||
// SAFETY: while the loop condition holds there are still elements in `offsets_l`, so it
|
||||
// is safe to point `end_l` to the previous element.
|
||||
//
|
||||
// The `ptr::swap` is safe if both its arguments are valid for reads and writes:
|
||||
// - Per the debug assert above, the distance between `l` and `r` is `block_l`
|
||||
// elements, so there can be at most `block_l` remaining offsets between `start_l`
|
||||
// and `end_l`. This means `r` will be moved at most `block_l` steps back, which
|
||||
// makes the `r.offset` calls valid (at that point `l == r`).
|
||||
// - `offsets_l` contains valid offsets into `v` collected during the partitioning of
|
||||
// the last block, so the `l.offset` calls are valid.
|
||||
unsafe {
|
||||
end_l = end_l.offset(-1);
|
||||
ptr::swap(l.offset(*end_l as isize), r.offset(-1));
|
||||
@ -449,6 +461,7 @@ where
|
||||
// Move its remaining out-of-order elements to the far left.
|
||||
debug_assert_eq!(width(l, r), block_r);
|
||||
while start_r < end_r {
|
||||
// SAFETY: See the reasoning in [remaining-elements-safety].
|
||||
unsafe {
|
||||
end_r = end_r.offset(-1);
|
||||
ptr::swap(l, r.offset(-(*end_r as isize) - 1));
|
||||
@ -481,6 +494,8 @@ where
|
||||
|
||||
// Read the pivot into a stack-allocated variable for efficiency. If a following comparison
|
||||
// operation panics, the pivot will be automatically written back into the slice.
|
||||
|
||||
// SAFETY: `pivot` is a reference to the first element of `v`, so `ptr::read` is safe.
|
||||
let mut tmp = mem::ManuallyDrop::new(unsafe { ptr::read(pivot) });
|
||||
let _pivot_guard = CopyOnDrop { src: &mut *tmp, dest: pivot };
|
||||
let pivot = &*tmp;
|
||||
@ -646,6 +661,12 @@ where
|
||||
|
||||
if len >= 8 {
|
||||
// Swaps indices so that `v[a] <= v[b]`.
|
||||
// SAFETY: `len >= 8` so there are at least two elements in the neighborhoods of
|
||||
// `a`, `b` and `c`. This means the three calls to `sort_adjacent` result in
|
||||
// corresponding calls to `sort3` with valid 3-item neighborhoods around each
|
||||
// pointer, which in turn means the calls to `sort2` are done with valid
|
||||
// references. Thus the `v.get_unchecked` calls are safe, as is the `ptr::swap`
|
||||
// call.
|
||||
let mut sort2 = |a: &mut usize, b: &mut usize| unsafe {
|
||||
if is_less(v.get_unchecked(*b), v.get_unchecked(*a)) {
|
||||
ptr::swap(a, b);
|
||||
|
@ -409,6 +409,8 @@ impl CString {
|
||||
/// Creates a C-compatible string by consuming a byte vector,
|
||||
/// without checking for interior 0 bytes.
|
||||
///
|
||||
/// Trailing 0 byte will be appended by this function.
|
||||
///
|
||||
/// This method is equivalent to [`CString::new`] except that no runtime
|
||||
/// assertion is made that `v` contains no 0 bytes, and it requires an
|
||||
/// actual byte vector, not anything that can be converted to one with Into.
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit fcb5e0ea68112d85a1d29a7a7335978ef2a02181
|
||||
Subproject commit eb1282ec444db94055fa9531b6f3f803e86bb382
|
@ -1 +1 @@
|
||||
Subproject commit fe6227eb3c8533200c52dffa42ef1b6f2f02c40e
|
||||
Subproject commit 2747c4bb2cbc0639b733793ddb0bf4e9daa2634e
|
@ -1 +1 @@
|
||||
Subproject commit 0e5ed7a4bec065f0cc18c35d1c904639e095314d
|
||||
Subproject commit 13747275bd14c2d2b453100498532f9ae5504769
|
@ -1 +1 @@
|
||||
Subproject commit 9d4132b56c4999cd3ce1aeca5f1b2f2cb0d11c24
|
||||
Subproject commit 28aca4a36962c709bce301c03114b5589381dfb8
|
@ -1 +1 @@
|
||||
Subproject commit 9198465b6ca8bed669df0cbb67c0e6d0b140803c
|
||||
Subproject commit d1f03cbaa39d9164f5fe4b9b93762668142e0dad
|
@ -1313,7 +1313,7 @@ impl Clean<Type> for hir::Ty<'_> {
|
||||
use rustc_hir::*;
|
||||
|
||||
match self.kind {
|
||||
TyKind::Never => Never,
|
||||
TyKind::Never => Primitive(PrimitiveType::Never),
|
||||
TyKind::Ptr(ref m) => RawPointer(m.mutbl, box m.ty.clean(cx)),
|
||||
TyKind::Rptr(ref l, ref m) => {
|
||||
// There are two times a `Fresh` lifetime can be created:
|
||||
@ -1402,7 +1402,7 @@ impl<'tcx> Clean<Type> for Ty<'tcx> {
|
||||
trace!("cleaning type: {:?}", self);
|
||||
let ty = normalize(cx, self).unwrap_or(self);
|
||||
match *ty.kind() {
|
||||
ty::Never => Never,
|
||||
ty::Never => Primitive(PrimitiveType::Never),
|
||||
ty::Bool => Primitive(PrimitiveType::Bool),
|
||||
ty::Char => Primitive(PrimitiveType::Char),
|
||||
ty::Int(int_ty) => Primitive(int_ty.into()),
|
||||
|
@ -11,8 +11,7 @@
|
||||
//! This module attempts to reconstruct the original where and/or parameter
|
||||
//! bounds by special casing scenarios such as these. Fun!
|
||||
|
||||
use std::collections::BTreeMap;
|
||||
|
||||
use rustc_data_structures::fx::FxIndexMap;
|
||||
use rustc_hir::def_id::DefId;
|
||||
use rustc_middle::ty;
|
||||
use rustc_span::Symbol;
|
||||
@ -23,8 +22,11 @@ use crate::clean::WherePredicate as WP;
|
||||
use crate::core::DocContext;
|
||||
|
||||
crate fn where_clauses(cx: &DocContext<'_>, clauses: Vec<WP>) -> Vec<WP> {
|
||||
// First, partition the where clause into its separate components
|
||||
let mut params: BTreeMap<_, (Vec<_>, Vec<_>)> = BTreeMap::new();
|
||||
// First, partition the where clause into its separate components.
|
||||
//
|
||||
// We use `FxIndexMap` so that the insertion order is preserved to prevent messing up to
|
||||
// the order of the generated bounds.
|
||||
let mut params: FxIndexMap<Symbol, (Vec<_>, Vec<_>)> = FxIndexMap::default();
|
||||
let mut lifetimes = Vec::new();
|
||||
let mut equalities = Vec::new();
|
||||
let mut tybounds = Vec::new();
|
||||
|
@ -1396,7 +1396,6 @@ crate enum Type {
|
||||
Slice(Box<Type>),
|
||||
/// The `String` field is about the size or the constant representing the array's length.
|
||||
Array(Box<Type>, String),
|
||||
Never,
|
||||
RawPointer(Mutability, Box<Type>),
|
||||
BorrowedRef {
|
||||
lifetime: Option<Lifetime>,
|
||||
@ -1462,7 +1461,6 @@ impl Type {
|
||||
}
|
||||
RawPointer(..) => Some(PrimitiveType::RawPointer),
|
||||
BareFunction(..) => Some(PrimitiveType::Fn),
|
||||
Never => Some(PrimitiveType::Never),
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
@ -1550,7 +1548,6 @@ impl Type {
|
||||
}
|
||||
}
|
||||
BareFunction(..) => PrimitiveType::Fn,
|
||||
Never => PrimitiveType::Never,
|
||||
Slice(..) => PrimitiveType::Slice,
|
||||
Array(..) => PrimitiveType::Array,
|
||||
RawPointer(..) => PrimitiveType::RawPointer,
|
||||
|
@ -25,6 +25,7 @@ use rustc_span::symbol::sym;
|
||||
use rustc_span::Span;
|
||||
|
||||
use std::cell::RefCell;
|
||||
use std::lazy::SyncLazy;
|
||||
use std::mem;
|
||||
use std::rc::Rc;
|
||||
|
||||
@ -271,9 +272,8 @@ crate fn create_config(
|
||||
providers.typeck_item_bodies = |_, _| {};
|
||||
// hack so that `used_trait_imports` won't try to call typeck
|
||||
providers.used_trait_imports = |_, _| {
|
||||
lazy_static! {
|
||||
static ref EMPTY_SET: FxHashSet<LocalDefId> = FxHashSet::default();
|
||||
}
|
||||
static EMPTY_SET: SyncLazy<FxHashSet<LocalDefId>> =
|
||||
SyncLazy::new(FxHashSet::default);
|
||||
&EMPTY_SET
|
||||
};
|
||||
// In case typeck does end up being called, don't ICE in case there were name resolution errors
|
||||
|
@ -761,6 +761,9 @@ fn fmt_type<'cx>(
|
||||
fmt::Display::fmt(&tybounds(bounds, lt, cx), f)
|
||||
}
|
||||
clean::Infer => write!(f, "_"),
|
||||
clean::Primitive(clean::PrimitiveType::Never) => {
|
||||
primitive_link(f, PrimitiveType::Never, "!", cx)
|
||||
}
|
||||
clean::Primitive(prim) => primitive_link(f, prim, &*prim.as_sym().as_str(), cx),
|
||||
clean::BareFunction(ref decl) => {
|
||||
if f.alternate() {
|
||||
@ -819,7 +822,6 @@ fn fmt_type<'cx>(
|
||||
primitive_link(f, PrimitiveType::Array, &format!("; {}]", Escape(n)), cx)
|
||||
}
|
||||
}
|
||||
clean::Never => primitive_link(f, PrimitiveType::Never, "!", cx),
|
||||
clean::RawPointer(m, ref t) => {
|
||||
let m = match m {
|
||||
hir::Mutability::Mut => "mut",
|
||||
|
@ -9,8 +9,8 @@ use crate::clean::PrimitiveType;
|
||||
use crate::html::escape::Escape;
|
||||
use crate::html::render::Context;
|
||||
|
||||
use std::collections::VecDeque;
|
||||
use std::fmt::{Display, Write};
|
||||
use std::iter::Peekable;
|
||||
|
||||
use rustc_lexer::{LiteralKind, TokenKind};
|
||||
use rustc_span::edition::Edition;
|
||||
@ -201,10 +201,57 @@ fn get_real_ident_class(text: &str, edition: Edition, allow_path_keywords: bool)
|
||||
})
|
||||
}
|
||||
|
||||
/// This iterator comes from the same idea than "Peekable" except that it allows to "peek" more than
|
||||
/// just the next item by using `peek_next`. The `peek` method always returns the next item after
|
||||
/// the current one whereas `peek_next` will return the next item after the last one peeked.
|
||||
///
|
||||
/// You can use both `peek` and `peek_next` at the same time without problem.
|
||||
struct PeekIter<'a> {
|
||||
stored: VecDeque<(TokenKind, &'a str)>,
|
||||
/// This position is reinitialized when using `next`. It is used in `peek_next`.
|
||||
peek_pos: usize,
|
||||
iter: TokenIter<'a>,
|
||||
}
|
||||
|
||||
impl PeekIter<'a> {
|
||||
fn new(iter: TokenIter<'a>) -> Self {
|
||||
Self { stored: VecDeque::new(), peek_pos: 0, iter }
|
||||
}
|
||||
/// Returns the next item after the current one. It doesn't interfer with `peek_next` output.
|
||||
fn peek(&mut self) -> Option<&(TokenKind, &'a str)> {
|
||||
if self.stored.is_empty() {
|
||||
if let Some(next) = self.iter.next() {
|
||||
self.stored.push_back(next);
|
||||
}
|
||||
}
|
||||
self.stored.front()
|
||||
}
|
||||
/// Returns the next item after the last one peeked. It doesn't interfer with `peek` output.
|
||||
fn peek_next(&mut self) -> Option<&(TokenKind, &'a str)> {
|
||||
self.peek_pos += 1;
|
||||
if self.peek_pos - 1 < self.stored.len() {
|
||||
self.stored.get(self.peek_pos - 1)
|
||||
} else if let Some(next) = self.iter.next() {
|
||||
self.stored.push_back(next);
|
||||
self.stored.back()
|
||||
} else {
|
||||
None
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl Iterator for PeekIter<'a> {
|
||||
type Item = (TokenKind, &'a str);
|
||||
fn next(&mut self) -> Option<Self::Item> {
|
||||
self.peek_pos = 0;
|
||||
if let Some(first) = self.stored.pop_front() { Some(first) } else { self.iter.next() }
|
||||
}
|
||||
}
|
||||
|
||||
/// Processes program tokens, classifying strings of text by highlighting
|
||||
/// category (`Class`).
|
||||
struct Classifier<'a> {
|
||||
tokens: Peekable<TokenIter<'a>>,
|
||||
tokens: PeekIter<'a>,
|
||||
in_attribute: bool,
|
||||
in_macro: bool,
|
||||
in_macro_nonterminal: bool,
|
||||
@ -218,7 +265,7 @@ impl<'a> Classifier<'a> {
|
||||
/// Takes as argument the source code to HTML-ify, the rust edition to use and the source code
|
||||
/// file span which will be used later on by the `span_correspondance_map`.
|
||||
fn new(src: &str, edition: Edition, file_span: Span) -> Classifier<'_> {
|
||||
let tokens = TokenIter { src }.peekable();
|
||||
let tokens = PeekIter::new(TokenIter { src });
|
||||
Classifier {
|
||||
tokens,
|
||||
in_attribute: false,
|
||||
@ -369,7 +416,7 @@ impl<'a> Classifier<'a> {
|
||||
// Assume that '&' or '*' is the reference or dereference operator
|
||||
// or a reference or pointer type. Unless, of course, it looks like
|
||||
// a logical and or a multiplication operator: `&&` or `* `.
|
||||
TokenKind::Star => match lookahead {
|
||||
TokenKind::Star => match self.peek() {
|
||||
Some(TokenKind::Whitespace) => Class::Op,
|
||||
_ => Class::RefKeyWord,
|
||||
},
|
||||
@ -480,6 +527,9 @@ impl<'a> Classifier<'a> {
|
||||
None => match text {
|
||||
"Option" | "Result" => Class::PreludeTy,
|
||||
"Some" | "None" | "Ok" | "Err" => Class::PreludeVal,
|
||||
// "union" is a weak keyword and is only considered as a keyword when declaring
|
||||
// a union type.
|
||||
"union" if self.check_if_is_union_keyword() => Class::KeyWord,
|
||||
_ if self.in_macro_nonterminal => {
|
||||
self.in_macro_nonterminal = false;
|
||||
Class::MacroNonTerminal
|
||||
@ -500,7 +550,17 @@ impl<'a> Classifier<'a> {
|
||||
}
|
||||
|
||||
fn peek(&mut self) -> Option<TokenKind> {
|
||||
self.tokens.peek().map(|(toke_kind, _text)| *toke_kind)
|
||||
self.tokens.peek().map(|(token_kind, _text)| *token_kind)
|
||||
}
|
||||
|
||||
fn check_if_is_union_keyword(&mut self) -> bool {
|
||||
while let Some(kind) = self.tokens.peek_next().map(|(token_kind, _text)| token_kind) {
|
||||
if *kind == TokenKind::Whitespace {
|
||||
continue;
|
||||
}
|
||||
return *kind == TokenKind::Ident;
|
||||
}
|
||||
false
|
||||
}
|
||||
}
|
||||
|
||||
|
8
src/librustdoc/html/highlight/fixtures/union.html
Normal file
8
src/librustdoc/html/highlight/fixtures/union.html
Normal file
@ -0,0 +1,8 @@
|
||||
<span class="kw">union</span> <span class="ident">Foo</span> {
|
||||
<span class="ident">i</span>: <span class="ident">i8</span>,
|
||||
<span class="ident">u</span>: <span class="ident">i8</span>,
|
||||
}
|
||||
|
||||
<span class="kw">fn</span> <span class="ident">main</span>() {
|
||||
<span class="kw">let</span> <span class="ident">union</span> <span class="op">=</span> <span class="number">0</span>;
|
||||
}
|
8
src/librustdoc/html/highlight/fixtures/union.rs
Normal file
8
src/librustdoc/html/highlight/fixtures/union.rs
Normal file
@ -0,0 +1,8 @@
|
||||
union Foo {
|
||||
i: i8,
|
||||
u: i8,
|
||||
}
|
||||
|
||||
fn main() {
|
||||
let union = 0;
|
||||
}
|
@ -54,3 +54,13 @@ let y = Self::whatever;";
|
||||
expect_file!["fixtures/highlight.html"].assert_eq(&html.into_inner());
|
||||
});
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_union_highlighting() {
|
||||
create_default_session_globals_then(|| {
|
||||
let src = include_str!("fixtures/union.rs");
|
||||
let mut html = Buffer::new();
|
||||
write_code(&mut html, src, Edition::Edition2018, None);
|
||||
expect_file!["fixtures/union.html"].assert_eq(&html.into_inner());
|
||||
});
|
||||
}
|
||||
|
@ -244,7 +244,6 @@ fn get_index_type_name(clean_type: &clean::Type, accept_generic: bool) -> Option
|
||||
| clean::Tuple(_)
|
||||
| clean::Slice(_)
|
||||
| clean::Array(_, _)
|
||||
| clean::Never
|
||||
| clean::RawPointer(_, _)
|
||||
| clean::QPath { .. }
|
||||
| clean::Infer
|
||||
|
@ -417,13 +417,13 @@ impl FromWithTcx<clean::Type> for Type {
|
||||
}
|
||||
}
|
||||
Generic(s) => Type::Generic(s.to_string()),
|
||||
Primitive(clean::PrimitiveType::Never) => Type::Never,
|
||||
Primitive(p) => Type::Primitive(p.as_sym().to_string()),
|
||||
BareFunction(f) => Type::FunctionPointer(Box::new((*f).into_tcx(tcx))),
|
||||
Tuple(t) => Type::Tuple(t.into_iter().map(|x| x.into_tcx(tcx)).collect()),
|
||||
Slice(t) => Type::Slice(Box::new((*t).into_tcx(tcx))),
|
||||
Array(t, s) => Type::Array { type_: Box::new((*t).into_tcx(tcx)), len: s },
|
||||
ImplTrait(g) => Type::ImplTrait(g.into_iter().map(|x| x.into_tcx(tcx)).collect()),
|
||||
Never => Type::Never,
|
||||
Infer => Type::Infer,
|
||||
RawPointer(mutability, type_) => Type::RawPointer {
|
||||
mutable: mutability == ast::Mutability::Mut,
|
||||
|
@ -18,8 +18,6 @@
|
||||
#![recursion_limit = "256"]
|
||||
#![warn(rustc::internal)]
|
||||
|
||||
#[macro_use]
|
||||
extern crate lazy_static;
|
||||
#[macro_use]
|
||||
extern crate tracing;
|
||||
|
||||
|
14
src/test/ui/asm/issue-89305.rs
Normal file
14
src/test/ui/asm/issue-89305.rs
Normal file
@ -0,0 +1,14 @@
|
||||
// Regression test for #89305, where a variable was erroneously reported
|
||||
// as both unused and possibly-uninitialized.
|
||||
|
||||
// check-pass
|
||||
|
||||
#![feature(asm)]
|
||||
#![warn(unused)]
|
||||
|
||||
fn main() {
|
||||
unsafe {
|
||||
let x: () = asm!("nop");
|
||||
//~^ WARNING: unused variable: `x`
|
||||
}
|
||||
}
|
15
src/test/ui/asm/issue-89305.stderr
Normal file
15
src/test/ui/asm/issue-89305.stderr
Normal file
@ -0,0 +1,15 @@
|
||||
warning: unused variable: `x`
|
||||
--> $DIR/issue-89305.rs:11:13
|
||||
|
|
||||
LL | let x: () = asm!("nop");
|
||||
| ^ help: if this is intentional, prefix it with an underscore: `_x`
|
||||
|
|
||||
note: the lint level is defined here
|
||||
--> $DIR/issue-89305.rs:7:9
|
||||
|
|
||||
LL | #![warn(unused)]
|
||||
| ^^^^^^
|
||||
= note: `#[warn(unused_variables)]` implied by `#[warn(unused)]`
|
||||
|
||||
warning: 1 warning emitted
|
||||
|
@ -9,7 +9,7 @@ LL | | type U = str;
|
||||
LL | | }
|
||||
| |_^
|
||||
|
|
||||
= help: consider adding a `#![recursion_limit="256"]` attribute to your crate (`hr_associated_type_bound_2`)
|
||||
= help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`hr_associated_type_bound_2`)
|
||||
note: required because of the requirements on the impl of `for<'b> X<'b>` for `u32`
|
||||
--> $DIR/hr-associated-type-bound-2.rs:11:6
|
||||
|
|
||||
@ -24,7 +24,7 @@ error[E0275]: overflow evaluating the requirement `for<'b> u32: X<'b>`
|
||||
LL | type U = str;
|
||||
| ^^^^^^^^^^^^^
|
||||
|
|
||||
= help: consider adding a `#![recursion_limit="256"]` attribute to your crate (`hr_associated_type_bound_2`)
|
||||
= help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`hr_associated_type_bound_2`)
|
||||
note: required because of the requirements on the impl of `for<'b> X<'b>` for `u32`
|
||||
--> $DIR/hr-associated-type-bound-2.rs:11:6
|
||||
|
|
||||
|
@ -4,7 +4,7 @@ error[E0055]: reached the recursion limit while auto-dereferencing `J`
|
||||
LL | let x: &Bottom = &t;
|
||||
| ^^ deref recursion limit reached
|
||||
|
|
||||
= help: consider adding a `#![recursion_limit="20"]` attribute to your crate (`issue_38940`)
|
||||
= help: consider increasing the recursion limit by adding a `#![recursion_limit = "20"]` attribute to your crate (`issue_38940`)
|
||||
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/issue-38940.rs:43:22
|
||||
|
@ -4,7 +4,7 @@ error[E0275]: overflow evaluating the requirement `K: Send`
|
||||
LL | is_send::<A>();
|
||||
| ^^^^^^^^^^^^
|
||||
|
|
||||
= help: consider adding a `#![recursion_limit="20"]` attribute to your crate (`recursion_limit`)
|
||||
= help: consider increasing the recursion limit by adding a `#![recursion_limit = "20"]` attribute to your crate (`recursion_limit`)
|
||||
note: required because it appears within the type `J`
|
||||
--> $DIR/recursion_limit.rs:24:9
|
||||
|
|
||||
|
@ -4,7 +4,7 @@ error[E0055]: reached the recursion limit while auto-dereferencing `J`
|
||||
LL | let x: &Bottom = &t;
|
||||
| ^^ deref recursion limit reached
|
||||
|
|
||||
= help: consider adding a `#![recursion_limit="20"]` attribute to your crate (`recursion_limit_deref`)
|
||||
= help: consider increasing the recursion limit by adding a `#![recursion_limit = "20"]` attribute to your crate (`recursion_limit_deref`)
|
||||
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/recursion_limit_deref.rs:50:22
|
||||
|
@ -7,7 +7,7 @@ LL | ($t:tt $($tail:tt)*) => { recurse!($($tail)*) };
|
||||
LL | recurse!(0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9);
|
||||
| -------------------------------------------------- in this macro invocation
|
||||
|
|
||||
= help: consider adding a `#![recursion_limit="20"]` attribute to your crate (`recursion_limit_macro`)
|
||||
= help: consider increasing the recursion limit by adding a `#![recursion_limit = "20"]` attribute to your crate (`recursion_limit_macro`)
|
||||
= note: this error originates in the macro `recurse` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
error: aborting due to previous error
|
||||
|
@ -4,7 +4,7 @@ error[E0055]: reached the recursion limit while auto-dereferencing `Foo`
|
||||
LL | ref_foo.foo();
|
||||
| ^^^ deref recursion limit reached
|
||||
|
|
||||
= help: consider adding a `#![recursion_limit="8"]` attribute to your crate (`E0055`)
|
||||
= help: consider increasing the recursion limit by adding a `#![recursion_limit = "8"]` attribute to your crate (`E0055`)
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
@ -4,7 +4,7 @@ error[E0275]: overflow evaluating the requirement `Bar<Bar<Bar<Bar<Bar<Bar<Bar<B
|
||||
LL | impl<T> Foo for T where Bar<T>: Foo {}
|
||||
| ^^^
|
||||
|
|
||||
= help: consider adding a `#![recursion_limit="256"]` attribute to your crate (`E0275`)
|
||||
= help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`E0275`)
|
||||
note: required because of the requirements on the impl of `Foo` for `Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<T>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>`
|
||||
--> $DIR/E0275.rs:5:9
|
||||
|
|
||||
|
@ -12,7 +12,7 @@ error[E0055]: reached the recursion limit while auto-dereferencing `Foo`
|
||||
LL | Foo.foo;
|
||||
| ^^^^^^^ deref recursion limit reached
|
||||
|
|
||||
= help: consider adding a `#![recursion_limit="256"]` attribute to your crate (`infinite_autoderef`)
|
||||
= help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`infinite_autoderef`)
|
||||
|
||||
error[E0055]: reached the recursion limit while auto-dereferencing `Foo`
|
||||
--> $DIR/infinite-autoderef.rs:25:9
|
||||
@ -20,7 +20,7 @@ error[E0055]: reached the recursion limit while auto-dereferencing `Foo`
|
||||
LL | Foo.foo;
|
||||
| ^^^ deref recursion limit reached
|
||||
|
|
||||
= help: consider adding a `#![recursion_limit="256"]` attribute to your crate (`infinite_autoderef`)
|
||||
= help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`infinite_autoderef`)
|
||||
|
||||
error[E0609]: no field `foo` on type `Foo`
|
||||
--> $DIR/infinite-autoderef.rs:25:9
|
||||
@ -34,7 +34,7 @@ error[E0055]: reached the recursion limit while auto-dereferencing `Foo`
|
||||
LL | Foo.bar();
|
||||
| ^^^ deref recursion limit reached
|
||||
|
|
||||
= help: consider adding a `#![recursion_limit="256"]` attribute to your crate (`infinite_autoderef`)
|
||||
= help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`infinite_autoderef`)
|
||||
|
||||
error[E0599]: no method named `bar` found for struct `Foo` in the current scope
|
||||
--> $DIR/infinite-autoderef.rs:26:9
|
||||
|
@ -7,7 +7,7 @@ LL | () => (recursive!())
|
||||
LL | recursive!()
|
||||
| ------------ in this macro invocation
|
||||
|
|
||||
= help: consider adding a `#![recursion_limit="256"]` attribute to your crate (`infinite_macro_expansion`)
|
||||
= help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`infinite_macro_expansion`)
|
||||
= note: this error originates in the macro `recursive` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
error: aborting due to previous error
|
||||
|
@ -7,7 +7,7 @@ LL | $n + prob1!($n - 1);
|
||||
LL | println!("Problem 1: {}", prob1!(1000));
|
||||
| ------------ in this macro invocation
|
||||
|
|
||||
= help: consider adding a `#![recursion_limit="256"]` attribute to your crate (`issue_16098`)
|
||||
= help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`issue_16098`)
|
||||
= note: this error originates in the macro `prob1` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
error: aborting due to previous error
|
||||
|
@ -4,7 +4,7 @@ error[E0275]: overflow evaluating the requirement `_: Sized`
|
||||
LL | 0.contains(bits);
|
||||
| ^^^^^^^^
|
||||
|
|
||||
= help: consider adding a `#![recursion_limit="256"]` attribute to your crate (`issue_18400`)
|
||||
= help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`issue_18400`)
|
||||
note: required because of the requirements on the impl of `Set<&[_]>` for `{integer}`
|
||||
--> $DIR/issue-18400.rs:6:16
|
||||
|
|
||||
|
@ -13,7 +13,7 @@ error[E0275]: overflow evaluating the requirement `NoData<NoData<NoData<NoData<N
|
||||
LL | impl<T> Foo for T where NoData<T>: Foo {
|
||||
| ^^^
|
||||
|
|
||||
= help: consider adding a `#![recursion_limit="256"]` attribute to your crate (`issue_20413`)
|
||||
= help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`issue_20413`)
|
||||
note: required because of the requirements on the impl of `Foo` for `NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<T>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>`
|
||||
--> $DIR/issue-20413.rs:8:9
|
||||
|
|
||||
@ -33,7 +33,7 @@ error[E0275]: overflow evaluating the requirement `NoData<NoData<NoData<NoData<N
|
||||
LL | impl<T> Foo for T where NoData<T>: Foo {
|
||||
| ^^^
|
||||
|
|
||||
= help: consider adding a `#![recursion_limit="256"]` attribute to your crate (`issue_20413`)
|
||||
= help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`issue_20413`)
|
||||
note: required because of the requirements on the impl of `Foo` for `NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<T>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>`
|
||||
--> $DIR/issue-20413.rs:8:9
|
||||
|
|
||||
@ -53,7 +53,7 @@ error[E0275]: overflow evaluating the requirement `EvenLessData<AlmostNoData<Eve
|
||||
LL | impl<T> Bar for T where EvenLessData<T>: Baz {
|
||||
| ^^^
|
||||
|
|
||||
= help: consider adding a `#![recursion_limit="256"]` attribute to your crate (`issue_20413`)
|
||||
= help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`issue_20413`)
|
||||
note: required because of the requirements on the impl of `Bar` for `AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<T>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>`
|
||||
--> $DIR/issue-20413.rs:28:9
|
||||
|
|
||||
@ -78,7 +78,7 @@ error[E0275]: overflow evaluating the requirement `EvenLessData<AlmostNoData<Eve
|
||||
LL | impl<T> Bar for T where EvenLessData<T>: Baz {
|
||||
| ^^^
|
||||
|
|
||||
= help: consider adding a `#![recursion_limit="256"]` attribute to your crate (`issue_20413`)
|
||||
= help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`issue_20413`)
|
||||
note: required because of the requirements on the impl of `Bar` for `AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<T>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>`
|
||||
--> $DIR/issue-20413.rs:28:9
|
||||
|
|
||||
@ -103,7 +103,7 @@ error[E0275]: overflow evaluating the requirement `AlmostNoData<EvenLessData<Alm
|
||||
LL | impl<T> Baz for T where AlmostNoData<T>: Bar {
|
||||
| ^^^
|
||||
|
|
||||
= help: consider adding a `#![recursion_limit="256"]` attribute to your crate (`issue_20413`)
|
||||
= help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`issue_20413`)
|
||||
note: required because of the requirements on the impl of `Baz` for `EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<T>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>`
|
||||
--> $DIR/issue-20413.rs:36:9
|
||||
|
|
||||
@ -128,7 +128,7 @@ error[E0275]: overflow evaluating the requirement `AlmostNoData<EvenLessData<Alm
|
||||
LL | impl<T> Baz for T where AlmostNoData<T>: Bar {
|
||||
| ^^^
|
||||
|
|
||||
= help: consider adding a `#![recursion_limit="256"]` attribute to your crate (`issue_20413`)
|
||||
= help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`issue_20413`)
|
||||
note: required because of the requirements on the impl of `Baz` for `EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<T>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>`
|
||||
--> $DIR/issue-20413.rs:36:9
|
||||
|
|
||||
|
@ -4,7 +4,7 @@ error[E0275]: overflow evaluating the requirement `<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
LL | type Next = <GetNext<T::Next> as Next>::Next;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: consider adding a `#![recursion_limit="256"]` attribute to your crate (`issue_23122_2`)
|
||||
= help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`issue_23122_2`)
|
||||
note: required because of the requirements on the impl of `Next` for `GetNext<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<T as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next>`
|
||||
--> $DIR/issue-23122-2.rs:8:15
|
||||
|
|
||||
|
@ -7,7 +7,7 @@ macro_rules! a {
|
||||
(A) => (concat!("", a!()));
|
||||
(A, $($A:ident),*) => (concat!("", a!($($A),*)))
|
||||
//~^ ERROR recursion limit reached
|
||||
//~| HELP consider adding
|
||||
//~| HELP consider increasing the recursion limit
|
||||
}
|
||||
|
||||
fn main() {
|
||||
|
@ -7,7 +7,7 @@ LL | (A, $($A:ident),*) => (concat!("", a!($($A),*)))
|
||||
LL | a!(A, A, A, A, A, A, A, A, A, A, A);
|
||||
| ------------------------------------ in this macro invocation
|
||||
|
|
||||
= help: consider adding a `#![recursion_limit="30"]` attribute to your crate (`issue_84632_eager_expansion_recursion_limit`)
|
||||
= help: consider increasing the recursion limit by adding a `#![recursion_limit = "30"]` attribute to your crate (`issue_84632_eager_expansion_recursion_limit`)
|
||||
= note: this error originates in the macro `a` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
error: aborting due to previous error
|
||||
|
@ -31,7 +31,7 @@ LL | my_recursive_macro!();
|
||||
LL | my_recursive_macro!();
|
||||
| ---------------------- in this macro invocation
|
||||
|
|
||||
= help: consider adding a `#![recursion_limit="8"]` attribute to your crate (`trace_faulty_macros`)
|
||||
= help: consider increasing the recursion limit by adding a `#![recursion_limit = "8"]` attribute to your crate (`trace_faulty_macros`)
|
||||
= note: this error originates in the macro `my_recursive_macro` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
note: trace_macro
|
||||
|
@ -1,6 +1,6 @@
|
||||
error[E0275]: overflow evaluating the requirement `Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut std::ops::Range<u8>, [closure@$DIR/issue-83150.rs:10:24: 10:33]>, [closure@$DIR/issue-83150.rs:10:24: 10:33]>, [closure@$DIR/issue-83150.rs:10:24: 10:33]>, [closure@$DIR/issue-83150.rs:10:24: 10:33]>, [closure@$DIR/issue-83150.rs:10:24: 10:33]>, [closure@$DIR/issue-83150.rs:10:24: 10:33]>, [closure@$DIR/issue-83150.rs:10:24: 10:33]>, [closure@$DIR/issue-83150.rs:10:24: 10:33]>, [closure@$DIR/issue-83150.rs:10:24: 10:33]>, [closure@$DIR/issue-83150.rs:10:24: 10:33]>, [closure@$DIR/issue-83150.rs:10:24: 10:33]>, [closure@$DIR/issue-83150.rs:10:24: 10:33]>, [closure@$DIR/issue-83150.rs:10:24: 10:33]>, [closure@$DIR/issue-83150.rs:10:24: 10:33]>, [closure@$DIR/issue-83150.rs:10:24: 10:33]>, [closure@$DIR/issue-83150.rs:10:24: 10:33]>, [closure@$DIR/issue-83150.rs:10:24: 10:33]>, [closure@$DIR/issue-83150.rs:10:24: 10:33]>, [closure@$DIR/issue-83150.rs:10:24: 10:33]>, [closure@$DIR/issue-83150.rs:10:24: 10:33]>, [closure@$DIR/issue-83150.rs:10:24: 10:33]>, [closure@$DIR/issue-83150.rs:10:24: 10:33]>, [closure@$DIR/issue-83150.rs:10:24: 10:33]>, [closure@$DIR/issue-83150.rs:10:24: 10:33]>, [closure@$DIR/issue-83150.rs:10:24: 10:33]>, [closure@$DIR/issue-83150.rs:10:24: 10:33]>, [closure@$DIR/issue-83150.rs:10:24: 10:33]>, [closure@$DIR/issue-83150.rs:10:24: 10:33]>, [closure@$DIR/issue-83150.rs:10:24: 10:33]>, [closure@$DIR/issue-83150.rs:10:24: 10:33]>, [closure@$DIR/issue-83150.rs:10:24: 10:33]>, [closure@$DIR/issue-83150.rs:10:24: 10:33]>, [closure@$DIR/issue-83150.rs:10:24: 10:33]>, [closure@$DIR/issue-83150.rs:10:24: 10:33]>, [closure@$DIR/issue-83150.rs:10:24: 10:33]>, [closure@$DIR/issue-83150.rs:10:24: 10:33]>, [closure@$DIR/issue-83150.rs:10:24: 10:33]>, [closure@$DIR/issue-83150.rs:10:24: 10:33]>, [closure@$DIR/issue-83150.rs:10:24: 10:33]>, [closure@$DIR/issue-83150.rs:10:24: 10:33]>, [closure@$DIR/issue-83150.rs:10:24: 10:33]>, [closure@$DIR/issue-83150.rs:10:24: 10:33]>, [closure@$DIR/issue-83150.rs:10:24: 10:33]>, [closure@$DIR/issue-83150.rs:10:24: 10:33]>, [closure@$DIR/issue-83150.rs:10:24: 10:33]>, [closure@$DIR/issue-83150.rs:10:24: 10:33]>, [closure@$DIR/issue-83150.rs:10:24: 10:33]>, [closure@$DIR/issue-83150.rs:10:24: 10:33]>, [closure@$DIR/issue-83150.rs:10:24: 10:33]>, [closure@$DIR/issue-83150.rs:10:24: 10:33]>, [closure@$DIR/issue-83150.rs:10:24: 10:33]>, [closure@$DIR/issue-83150.rs:10:24: 10:33]>, [closure@$DIR/issue-83150.rs:10:24: 10:33]>, [closure@$DIR/issue-83150.rs:10:24: 10:33]>, [closure@$DIR/issue-83150.rs:10:24: 10:33]>, [closure@$DIR/issue-83150.rs:10:24: 10:33]>, [closure@$DIR/issue-83150.rs:10:24: 10:33]>, [closure@$DIR/issue-83150.rs:10:24: 10:33]>, [closure@$DIR/issue-83150.rs:10:24: 10:33]>, [closure@$DIR/issue-83150.rs:10:24: 10:33]>, [closure@$DIR/issue-83150.rs:10:24: 10:33]>, [closure@$DIR/issue-83150.rs:10:24: 10:33]>, [closure@$DIR/issue-83150.rs:10:24: 10:33]>, [closure@$DIR/issue-83150.rs:10:24: 10:33]>: Iterator`
|
||||
|
|
||||
= help: consider adding a `#![recursion_limit="256"]` attribute to your crate (`issue_83150`)
|
||||
= help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`issue_83150`)
|
||||
= note: required because of the requirements on the impl of `Iterator` for `&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut std::ops::Range<u8>, [closure@$DIR/issue-83150.rs:10:24: 10:33]>, [closure@$DIR/issue-83150.rs:10:24: 10:33]>, [closure@$DIR/issue-83150.rs:10:24: 10:33]>, [closure@$DIR/issue-83150.rs:10:24: 10:33]>, [closure@$DIR/issue-83150.rs:10:24: 10:33]>, [closure@$DIR/issue-83150.rs:10:24: 10:33]>, [closure@$DIR/issue-83150.rs:10:24: 10:33]>, [closure@$DIR/issue-83150.rs:10:24: 10:33]>, [closure@$DIR/issue-83150.rs:10:24: 10:33]>, [closure@$DIR/issue-83150.rs:10:24: 10:33]>, [closure@$DIR/issue-83150.rs:10:24: 10:33]>, [closure@$DIR/issue-83150.rs:10:24: 10:33]>, [closure@$DIR/issue-83150.rs:10:24: 10:33]>, [closure@$DIR/issue-83150.rs:10:24: 10:33]>, [closure@$DIR/issue-83150.rs:10:24: 10:33]>, [closure@$DIR/issue-83150.rs:10:24: 10:33]>, [closure@$DIR/issue-83150.rs:10:24: 10:33]>, [closure@$DIR/issue-83150.rs:10:24: 10:33]>, [closure@$DIR/issue-83150.rs:10:24: 10:33]>, [closure@$DIR/issue-83150.rs:10:24: 10:33]>, [closure@$DIR/issue-83150.rs:10:24: 10:33]>, [closure@$DIR/issue-83150.rs:10:24: 10:33]>, [closure@$DIR/issue-83150.rs:10:24: 10:33]>, [closure@$DIR/issue-83150.rs:10:24: 10:33]>, [closure@$DIR/issue-83150.rs:10:24: 10:33]>, [closure@$DIR/issue-83150.rs:10:24: 10:33]>, [closure@$DIR/issue-83150.rs:10:24: 10:33]>, [closure@$DIR/issue-83150.rs:10:24: 10:33]>, [closure@$DIR/issue-83150.rs:10:24: 10:33]>, [closure@$DIR/issue-83150.rs:10:24: 10:33]>, [closure@$DIR/issue-83150.rs:10:24: 10:33]>, [closure@$DIR/issue-83150.rs:10:24: 10:33]>, [closure@$DIR/issue-83150.rs:10:24: 10:33]>, [closure@$DIR/issue-83150.rs:10:24: 10:33]>, [closure@$DIR/issue-83150.rs:10:24: 10:33]>, [closure@$DIR/issue-83150.rs:10:24: 10:33]>, [closure@$DIR/issue-83150.rs:10:24: 10:33]>, [closure@$DIR/issue-83150.rs:10:24: 10:33]>, [closure@$DIR/issue-83150.rs:10:24: 10:33]>, [closure@$DIR/issue-83150.rs:10:24: 10:33]>, [closure@$DIR/issue-83150.rs:10:24: 10:33]>, [closure@$DIR/issue-83150.rs:10:24: 10:33]>, [closure@$DIR/issue-83150.rs:10:24: 10:33]>, [closure@$DIR/issue-83150.rs:10:24: 10:33]>, [closure@$DIR/issue-83150.rs:10:24: 10:33]>, [closure@$DIR/issue-83150.rs:10:24: 10:33]>, [closure@$DIR/issue-83150.rs:10:24: 10:33]>, [closure@$DIR/issue-83150.rs:10:24: 10:33]>, [closure@$DIR/issue-83150.rs:10:24: 10:33]>, [closure@$DIR/issue-83150.rs:10:24: 10:33]>, [closure@$DIR/issue-83150.rs:10:24: 10:33]>, [closure@$DIR/issue-83150.rs:10:24: 10:33]>, [closure@$DIR/issue-83150.rs:10:24: 10:33]>, [closure@$DIR/issue-83150.rs:10:24: 10:33]>, [closure@$DIR/issue-83150.rs:10:24: 10:33]>, [closure@$DIR/issue-83150.rs:10:24: 10:33]>, [closure@$DIR/issue-83150.rs:10:24: 10:33]>, [closure@$DIR/issue-83150.rs:10:24: 10:33]>, [closure@$DIR/issue-83150.rs:10:24: 10:33]>, [closure@$DIR/issue-83150.rs:10:24: 10:33]>, [closure@$DIR/issue-83150.rs:10:24: 10:33]>, [closure@$DIR/issue-83150.rs:10:24: 10:33]>, [closure@$DIR/issue-83150.rs:10:24: 10:33]>, [closure@$DIR/issue-83150.rs:10:24: 10:33]>`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
6
src/test/ui/recursion_limit/no-value.rs
Normal file
6
src/test/ui/recursion_limit/no-value.rs
Normal file
@ -0,0 +1,6 @@
|
||||
// Test the parse error for no value provided to recursion_limit
|
||||
|
||||
#![recursion_limit]
|
||||
//~^ ERROR malformed `recursion_limit` attribute input
|
||||
|
||||
fn main() {}
|
8
src/test/ui/recursion_limit/no-value.stderr
Normal file
8
src/test/ui/recursion_limit/no-value.stderr
Normal file
@ -0,0 +1,8 @@
|
||||
error: malformed `recursion_limit` attribute input
|
||||
--> $DIR/no-value.rs:3:1
|
||||
|
|
||||
LL | #![recursion_limit]
|
||||
| ^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#![recursion_limit = "N"]`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
7
src/test/ui/recursion_limit/zero-overflow.rs
Normal file
7
src/test/ui/recursion_limit/zero-overflow.rs
Normal file
@ -0,0 +1,7 @@
|
||||
//~ ERROR overflow evaluating the requirement `&mut Self: DispatchFromDyn<&mut RustaceansAreAwesome>
|
||||
//~| HELP consider increasing the recursion limit
|
||||
// build-fail
|
||||
|
||||
#![recursion_limit = "0"]
|
||||
|
||||
fn main() {}
|
7
src/test/ui/recursion_limit/zero-overflow.stderr
Normal file
7
src/test/ui/recursion_limit/zero-overflow.stderr
Normal file
@ -0,0 +1,7 @@
|
||||
error[E0275]: overflow evaluating the requirement `&mut Self: DispatchFromDyn<&mut RustaceansAreAwesome>`
|
||||
|
|
||||
= help: consider increasing the recursion limit by adding a `#![recursion_limit = "2"]` attribute to your crate (`zero_overflow`)
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0275`.
|
@ -4,7 +4,7 @@ error: recursion limit reached while expanding `test!`
|
||||
LL | test!(test);
|
||||
| ^^^^^^^^^^^^
|
||||
|
|
||||
= help: consider adding a `#![recursion_limit="0"]` attribute to your crate (`zero`)
|
||||
= help: consider increasing the recursion limit by adding a `#![recursion_limit = "2"]` attribute to your crate (`zero`)
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
@ -4,7 +4,7 @@ error[E0275]: overflow evaluating the requirement `Option<_>: Sized`
|
||||
LL | iso(left, right)
|
||||
| ^^^
|
||||
|
|
||||
= help: consider adding a `#![recursion_limit="256"]` attribute to your crate (`mutual_recursion_issue_75860`)
|
||||
= help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`mutual_recursion_issue_75860`)
|
||||
note: required by a bound in `Option`
|
||||
--> $SRC_DIR/core/src/option.rs:LL:COL
|
||||
|
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 0121d66aa2ef5ffa9735f86c2b56f5fdc5a837a6
|
||||
Subproject commit d56b42c549dbb7e7d0f712c51b39400260d114d4
|
@ -1 +1 @@
|
||||
Subproject commit f1d7f98ed07b9934286b9c4809dd4d7a47537879
|
||||
Subproject commit 009e6ceb1ddcd27a9ced3bcb7d0ef823379185a1
|
Loading…
Reference in New Issue
Block a user