Auto merge of #82911 - m-ou-se:rollup-rjomgja, r=m-ou-se
Rollup of 11 pull requests Successful merges: - #82711 (Add documentation for string->Cow conversions) - #82767 (Update minifier dependency version) - #82800 (Move rustdoc UI tests into a subdirectory) - #82810 (Typo fix in Unstable book: `cargo cov` -> `cargo profdata`) - #82829 (Handle negative literals in cast overflow warning) - #82854 (Account for `if (let pat = expr) {}`) - #82870 (Add note about the `#[doc(no-inline)]` usage) - #82874 (Add codegen tests for some issues closed by LLVM 12) - #82881 (diagnostics: Be clear about "crate root" and `::foo` paths in resolve diagnostics) - #82888 (Grammar Fixes) - #82897 ([.mailmap] Add entry for Ramkumar Ramachandra) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
This commit is contained in:
commit
bb3afe1e60
1
.mailmap
1
.mailmap
@ -235,6 +235,7 @@ Philipp Matthias Schäfer <philipp.matthias.schaefer@posteo.de>
|
||||
Przemysław Wesołek <jest@go.art.pl> Przemek Wesołek <jest@go.art.pl>
|
||||
Rafael Ávila de Espíndola <respindola@mozilla.com> Rafael Avila de Espindola <espindola@dream.(none)>
|
||||
Ralph Giles <giles@thaumas.net> Ralph Giles <giles@mozilla.com>
|
||||
Ramkumar Ramachandra <r@artagnon.com> <artagnon@gmail.com>
|
||||
Renato Riccieri Santos Zannon <renato@rrsz.com.br>
|
||||
Richard Diamond <wichard@vitalitystudios.com> <wichard@hahbee.co>
|
||||
Rob Arnold <robarnold@cs.cmu.edu>
|
||||
|
@ -2214,9 +2214,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "minifier"
|
||||
version = "0.0.33"
|
||||
version = "0.0.39"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "70bf0db2475f5e627787da77ca52fe33c294063f49f4134b8bc662eedb5e7332"
|
||||
checksum = "6cdf618de5c9c98d4a7b2e0d1f1e44f82a19196cfd94040bb203621c25d28d98"
|
||||
dependencies = [
|
||||
"macro-utils",
|
||||
]
|
||||
|
@ -1129,6 +1129,14 @@ pub fn to_bound(&self) -> Option<GenericBound> {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn peel_parens(&self) -> &Expr {
|
||||
let mut expr = self;
|
||||
while let ExprKind::Paren(inner) = &expr.kind {
|
||||
expr = &inner;
|
||||
}
|
||||
expr
|
||||
}
|
||||
|
||||
/// Attempts to reparse as `Ty` (for diagnostic purposes).
|
||||
pub fn to_ty(&self) -> Option<P<Ty>> {
|
||||
let kind = match &self.kind {
|
||||
|
@ -97,6 +97,23 @@ pub(super) fn lower_expr_mut(&mut self, e: &Expr) -> hir::Expr<'hir> {
|
||||
ExprKind::Let(ref pat, ref scrutinee) => {
|
||||
self.lower_expr_if_let(e.span, pat, scrutinee, then, else_opt.as_deref())
|
||||
}
|
||||
ExprKind::Paren(ref paren) => match paren.peel_parens().kind {
|
||||
ExprKind::Let(ref pat, ref scrutinee) => {
|
||||
// A user has written `if (let Some(x) = foo) {`, we want to avoid
|
||||
// confusing them with mentions of nightly features.
|
||||
// If this logic is changed, you will also likely need to touch
|
||||
// `unused::UnusedParens::check_expr`.
|
||||
self.if_let_expr_with_parens(cond, &paren.peel_parens());
|
||||
self.lower_expr_if_let(
|
||||
e.span,
|
||||
pat,
|
||||
scrutinee,
|
||||
then,
|
||||
else_opt.as_deref(),
|
||||
)
|
||||
}
|
||||
_ => self.lower_expr_if(cond, then, else_opt.as_deref()),
|
||||
},
|
||||
_ => self.lower_expr_if(cond, then, else_opt.as_deref()),
|
||||
},
|
||||
ExprKind::While(ref cond, ref body, opt_label) => self
|
||||
@ -346,6 +363,25 @@ fn lower_legacy_const_generics(
|
||||
hir::ExprKind::Call(f, self.lower_exprs(&real_args))
|
||||
}
|
||||
|
||||
fn if_let_expr_with_parens(&mut self, cond: &Expr, paren: &Expr) {
|
||||
let start = cond.span.until(paren.span);
|
||||
let end = paren.span.shrink_to_hi().until(cond.span.shrink_to_hi());
|
||||
self.sess
|
||||
.struct_span_err(
|
||||
vec![start, end],
|
||||
"invalid parentheses around `let` expression in `if let`",
|
||||
)
|
||||
.multipart_suggestion(
|
||||
"`if let` needs to be written without parentheses",
|
||||
vec![(start, String::new()), (end, String::new())],
|
||||
rustc_errors::Applicability::MachineApplicable,
|
||||
)
|
||||
.emit();
|
||||
// Ideally, we'd remove the feature gating of a `let` expression since we are already
|
||||
// complaining about it here, but `feature_gate::check_crate` has already run by now:
|
||||
// self.sess.parse_sess.gated_spans.ungate_last(sym::let_chains, paren.span);
|
||||
}
|
||||
|
||||
/// Emit an error and lower `ast::ExprKind::Let(pat, scrutinee)` into:
|
||||
/// ```rust
|
||||
/// match scrutinee { pats => true, _ => false }
|
||||
@ -356,8 +392,10 @@ fn lower_expr_let(&mut self, span: Span, pat: &Pat, scrutinee: &Expr) -> hir::Ex
|
||||
if self.sess.opts.unstable_features.is_nightly_build() {
|
||||
self.sess
|
||||
.struct_span_err(span, "`let` expressions are not supported here")
|
||||
.note("only supported directly in conditions of `if`- and `while`-expressions")
|
||||
.note("as well as when nested within `&&` and parenthesis in those conditions")
|
||||
.note(
|
||||
"only supported directly without parentheses in conditions of `if`- and \
|
||||
`while`-expressions, as well as in `let` chains within parentheses",
|
||||
)
|
||||
.emit();
|
||||
} else {
|
||||
self.sess
|
||||
|
@ -638,8 +638,16 @@ macro_rules! gate_all {
|
||||
}
|
||||
};
|
||||
}
|
||||
gate_all!(if_let_guard, "`if let` guards are experimental");
|
||||
gate_all!(let_chains, "`let` expressions in this position are experimental");
|
||||
gate_all!(
|
||||
if_let_guard,
|
||||
"`if let` guards are experimental",
|
||||
"you can write `if matches!(<expr>, <pattern>)` instead of `if let <pattern> = <expr>`"
|
||||
);
|
||||
gate_all!(
|
||||
let_chains,
|
||||
"`let` expressions in this position are experimental",
|
||||
"you can write `matches!(<expr>, <pattern>)` instead of `let <pattern> = <expr>`"
|
||||
);
|
||||
gate_all!(
|
||||
async_closure,
|
||||
"async closures are unstable",
|
||||
|
@ -217,7 +217,11 @@ fn report_bin_hex_error(
|
||||
cx.struct_span_lint(OVERFLOWING_LITERALS, expr.span, |lint| {
|
||||
let (t, actually) = match ty {
|
||||
attr::IntType::SignedInt(t) => {
|
||||
let actually = size.sign_extend(val) as i128;
|
||||
let actually = if negative {
|
||||
-(size.sign_extend(val) as i128)
|
||||
} else {
|
||||
size.sign_extend(val) as i128
|
||||
};
|
||||
(t.name_str(), actually.to_string())
|
||||
}
|
||||
attr::IntType::UnsignedInt(t) => {
|
||||
@ -226,11 +230,22 @@ fn report_bin_hex_error(
|
||||
}
|
||||
};
|
||||
let mut err = lint.build(&format!("literal out of range for `{}`", t));
|
||||
err.note(&format!(
|
||||
"the literal `{}` (decimal `{}`) does not fit into \
|
||||
the type `{}` and will become `{}{}`",
|
||||
repr_str, val, t, actually, t
|
||||
));
|
||||
if negative {
|
||||
// If the value is negative,
|
||||
// emits a note about the value itself, apart from the literal.
|
||||
err.note(&format!(
|
||||
"the literal `{}` (decimal `{}`) does not fit into \
|
||||
the type `{}`",
|
||||
repr_str, val, t
|
||||
));
|
||||
err.note(&format!("and the value `-{}` will become `{}{}`", repr_str, actually, t));
|
||||
} else {
|
||||
err.note(&format!(
|
||||
"the literal `{}` (decimal `{}`) does not fit into \
|
||||
the type `{}` and will become `{}{}`",
|
||||
repr_str, val, t, actually, t
|
||||
));
|
||||
}
|
||||
if let Some(sugg_ty) =
|
||||
get_type_suggestion(&cx.typeck_results().node_type(expr.hir_id), val, negative)
|
||||
{
|
||||
|
@ -602,7 +602,7 @@ fn check_expr(&mut self, cx: &EarlyContext<'_>, e: &ast::Expr) {
|
||||
use rustc_ast::ExprKind::*;
|
||||
let (value, ctx, followed_by_block, left_pos, right_pos) = match e.kind {
|
||||
// Do not lint `unused_braces` in `if let` expressions.
|
||||
If(ref cond, ref block, ..)
|
||||
If(ref cond, ref block, _)
|
||||
if !matches!(cond.kind, Let(_, _)) || Self::LINT_EXPR_IN_PATTERN_MATCHING_CTX =>
|
||||
{
|
||||
let left = e.span.lo() + rustc_span::BytePos(2);
|
||||
@ -816,8 +816,33 @@ fn check_unused_parens_pat(
|
||||
|
||||
impl EarlyLintPass for UnusedParens {
|
||||
fn check_expr(&mut self, cx: &EarlyContext<'_>, e: &ast::Expr) {
|
||||
if let ExprKind::Let(ref pat, ..) | ExprKind::ForLoop(ref pat, ..) = e.kind {
|
||||
self.check_unused_parens_pat(cx, pat, false, false);
|
||||
match e.kind {
|
||||
ExprKind::Let(ref pat, _) | ExprKind::ForLoop(ref pat, ..) => {
|
||||
self.check_unused_parens_pat(cx, pat, false, false);
|
||||
}
|
||||
// We ignore parens in cases like `if (((let Some(0) = Some(1))))` because we already
|
||||
// handle a hard error for them during AST lowering in `lower_expr_mut`, but we still
|
||||
// want to complain about things like `if let 42 = (42)`.
|
||||
ExprKind::If(ref cond, ref block, ref else_)
|
||||
if matches!(cond.peel_parens().kind, ExprKind::Let(..)) =>
|
||||
{
|
||||
self.check_unused_delims_expr(
|
||||
cx,
|
||||
cond.peel_parens(),
|
||||
UnusedDelimsCtx::LetScrutineeExpr,
|
||||
true,
|
||||
None,
|
||||
None,
|
||||
);
|
||||
for stmt in &block.stmts {
|
||||
<Self as UnusedDelimLint>::check_stmt(self, cx, stmt);
|
||||
}
|
||||
if let Some(e) = else_ {
|
||||
<Self as UnusedDelimLint>::check_expr(self, cx, e);
|
||||
}
|
||||
return;
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
|
||||
<Self as UnusedDelimLint>::check_expr(self, cx, e)
|
||||
|
@ -16,6 +16,7 @@
|
||||
use rustc_hir::def_id::{DefId, CRATE_DEF_INDEX, LOCAL_CRATE};
|
||||
use rustc_hir::PrimTy;
|
||||
use rustc_session::parse::feature_err;
|
||||
use rustc_span::edition::Edition;
|
||||
use rustc_span::hygiene::MacroKind;
|
||||
use rustc_span::lev_distance::find_best_match_for_name;
|
||||
use rustc_span::symbol::{kw, sym, Ident, Symbol};
|
||||
@ -133,7 +134,7 @@ pub(crate) fn smart_resolve_report_errors(
|
||||
let is_enum_variant = &|res| matches!(res, Res::Def(DefKind::Variant, _));
|
||||
|
||||
// Make the base error.
|
||||
let expected = source.descr_expected();
|
||||
let mut expected = source.descr_expected();
|
||||
let path_str = Segment::names_to_string(path);
|
||||
let item_str = path.last().unwrap().ident;
|
||||
let (base_msg, fallback_label, base_span, could_be_expr) = if let Some(res) = res {
|
||||
@ -166,6 +167,15 @@ pub(crate) fn smart_resolve_report_errors(
|
||||
let (mod_prefix, mod_str) = if path.len() == 1 {
|
||||
(String::new(), "this scope".to_string())
|
||||
} else if path.len() == 2 && path[0].ident.name == kw::PathRoot {
|
||||
if self.r.session.edition() > Edition::Edition2015 {
|
||||
// In edition 2018 onwards, the `::foo` syntax may only pull from the extern prelude
|
||||
// which overrides all other expectations of item type
|
||||
expected = "crate";
|
||||
(String::new(), "the list of imported crates".to_string())
|
||||
} else {
|
||||
(String::new(), "the crate root".to_string())
|
||||
}
|
||||
} else if path.len() == 2 && path[0].ident.name == kw::Crate {
|
||||
(String::new(), "the crate root".to_string())
|
||||
} else {
|
||||
let mod_path = &path[..path.len() - 1];
|
||||
|
@ -2433,8 +2433,10 @@ enum FindBindingResult<'a> {
|
||||
Applicability::MaybeIncorrect,
|
||||
)),
|
||||
)
|
||||
} else {
|
||||
} else if self.session.edition() == Edition::Edition2015 {
|
||||
(format!("maybe a missing crate `{}`?", ident), None)
|
||||
} else {
|
||||
(format!("could not find `{}` in the crate root", ident), None)
|
||||
}
|
||||
} else if i == 0 {
|
||||
if ident
|
||||
@ -2450,10 +2452,16 @@ enum FindBindingResult<'a> {
|
||||
}
|
||||
} else {
|
||||
let parent = path[i - 1].ident.name;
|
||||
let parent = if parent == kw::PathRoot {
|
||||
"crate root".to_owned()
|
||||
} else {
|
||||
format!("`{}`", parent)
|
||||
let parent = match parent {
|
||||
// ::foo is mounted at the crate root for 2015, and is the extern
|
||||
// prelude for 2018+
|
||||
kw::PathRoot if self.session.edition() > Edition::Edition2015 => {
|
||||
"the list of imported crates".to_owned()
|
||||
}
|
||||
kw::PathRoot | kw::Crate => "the crate root".to_owned(),
|
||||
_ => {
|
||||
format!("`{}`", parent)
|
||||
}
|
||||
};
|
||||
|
||||
let mut msg = format!("could not find `{}` in {}", ident, parent);
|
||||
|
@ -2352,6 +2352,16 @@ fn from(s: Cow<'a, str>) -> String {
|
||||
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
impl<'a> From<&'a str> for Cow<'a, str> {
|
||||
/// Converts a string slice into a Borrowed variant.
|
||||
/// No heap allocation is performed, and the string
|
||||
/// is not copied.
|
||||
///
|
||||
/// # Example
|
||||
///
|
||||
/// ```
|
||||
/// # use std::borrow::Cow;
|
||||
/// assert_eq!(Cow::from("eggplant"), Cow::Borrowed("eggplant"));
|
||||
/// ```
|
||||
#[inline]
|
||||
fn from(s: &'a str) -> Cow<'a, str> {
|
||||
Cow::Borrowed(s)
|
||||
@ -2360,6 +2370,18 @@ fn from(s: &'a str) -> Cow<'a, str> {
|
||||
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
impl<'a> From<String> for Cow<'a, str> {
|
||||
/// Converts a String into an Owned variant.
|
||||
/// No heap allocation is performed, and the string
|
||||
/// is not copied.
|
||||
///
|
||||
/// # Example
|
||||
///
|
||||
/// ```
|
||||
/// # use std::borrow::Cow;
|
||||
/// let s = "eggplant".to_string();
|
||||
/// let s2 = "eggplant".to_string();
|
||||
/// assert_eq!(Cow::from(s), Cow::<'static, str>::Owned(s2));
|
||||
/// ```
|
||||
#[inline]
|
||||
fn from(s: String) -> Cow<'a, str> {
|
||||
Cow::Owned(s)
|
||||
@ -2368,6 +2390,17 @@ fn from(s: String) -> Cow<'a, str> {
|
||||
|
||||
#[stable(feature = "cow_from_string_ref", since = "1.28.0")]
|
||||
impl<'a> From<&'a String> for Cow<'a, str> {
|
||||
/// Converts a String reference into a Borrowed variant.
|
||||
/// No heap allocation is performed, and the string
|
||||
/// is not copied.
|
||||
///
|
||||
/// # Example
|
||||
///
|
||||
/// ```
|
||||
/// # use std::borrow::Cow;
|
||||
/// let s = "eggplant".to_string();
|
||||
/// assert_eq!(Cow::from(&s), Cow::Borrowed("eggplant"));
|
||||
/// ```
|
||||
#[inline]
|
||||
fn from(s: &'a String) -> Cow<'a, str> {
|
||||
Cow::Borrowed(s.as_str())
|
||||
|
@ -42,7 +42,7 @@
|
||||
/// without causing much metadata bloat.
|
||||
///
|
||||
/// The trait is marked unsafe in order to restrict implementors to fixed-size
|
||||
/// arrays. User of this trait can assume that implementors have the exact
|
||||
/// arrays. A user of this trait can assume that implementors have the exact
|
||||
/// layout in memory of a fixed size array (for example, for unsafe
|
||||
/// initialization).
|
||||
///
|
||||
@ -489,7 +489,7 @@ pub fn as_mut_slice(&mut self) -> &mut [T] {
|
||||
/// ```
|
||||
///
|
||||
/// This method is particularly useful if combined with other methods, like
|
||||
/// [`map`](#method.map). This way, you can can avoid moving the original
|
||||
/// [`map`](#method.map). This way, you can avoid moving the original
|
||||
/// array if its elements are not `Copy`.
|
||||
///
|
||||
/// ```
|
||||
@ -564,7 +564,7 @@ pub fn as_mut_slice(&mut self) -> &mut [T] {
|
||||
/// yields fewer than `N` items, `None` is returned and all already yielded
|
||||
/// items are dropped.
|
||||
///
|
||||
/// Since the iterator is passed as mutable reference and this function calls
|
||||
/// Since the iterator is passed as a mutable reference and this function calls
|
||||
/// `next` at most `N` times, the iterator can still be used afterwards to
|
||||
/// retrieve the remaining items.
|
||||
///
|
||||
|
@ -395,7 +395,11 @@
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
pub use core::any;
|
||||
#[stable(feature = "simd_arch", since = "1.27.0")]
|
||||
#[doc(no_inline)]
|
||||
// The `no_inline`-attribute is required to make the documentation of all
|
||||
// targets available.
|
||||
// See https://github.com/rust-lang/rust/pull/57808#issuecomment-457390549 for
|
||||
// more information.
|
||||
#[doc(no_inline)] // Note (#82861): required for correct documentation
|
||||
pub use core::arch;
|
||||
#[stable(feature = "core_array", since = "1.36.0")]
|
||||
pub use core::array;
|
||||
|
@ -128,7 +128,7 @@ $ cargo profdata -- --help # note the additional "--" preceding the tool-specif
|
||||
|
||||
## Creating coverage reports
|
||||
|
||||
Raw profiles have to be indexed before they can be used to generate coverage reports. This is done using [`llvm-profdata merge`] (or `cargo cov -- merge`), which can combine multiple raw profiles and index them at the same time:
|
||||
Raw profiles have to be indexed before they can be used to generate coverage reports. This is done using [`llvm-profdata merge`] (or `cargo profdata -- merge`), which can combine multiple raw profiles and index them at the same time:
|
||||
|
||||
```shell
|
||||
$ llvm-profdata merge -sparse formatjson5.profraw -o formatjson5.profdata
|
||||
|
@ -10,7 +10,7 @@ path = "lib.rs"
|
||||
[dependencies]
|
||||
arrayvec = { version = "0.5.1", default-features = false }
|
||||
pulldown-cmark = { version = "0.8", default-features = false }
|
||||
minifier = "0.0.33"
|
||||
minifier = "0.0.39"
|
||||
rayon = { version = "0.3.0", package = "rustc-rayon" }
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
serde_json = "1.0"
|
||||
|
27
src/test/codegen/issue-73031.rs
Normal file
27
src/test/codegen/issue-73031.rs
Normal file
@ -0,0 +1,27 @@
|
||||
// min-llvm-version: 12.0.0
|
||||
// compile-flags: -O
|
||||
#![crate_type = "lib"]
|
||||
|
||||
// Test that LLVM can eliminate the unreachable `All::None` branch.
|
||||
|
||||
pub enum All {
|
||||
None,
|
||||
Foo,
|
||||
Bar,
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @issue_73031
|
||||
#[no_mangle]
|
||||
pub fn issue_73031(a: &mut All, q: i32) -> i32 {
|
||||
*a = if q == 5 {
|
||||
All::Foo
|
||||
} else {
|
||||
All::Bar
|
||||
};
|
||||
match *a {
|
||||
// CHECK-NOT: panic
|
||||
All::None => panic!(),
|
||||
All::Foo => 1,
|
||||
All::Bar => 2,
|
||||
}
|
||||
}
|
16
src/test/codegen/issue-75546.rs
Normal file
16
src/test/codegen/issue-75546.rs
Normal file
@ -0,0 +1,16 @@
|
||||
// min-llvm-version: 12.0.0
|
||||
// compile-flags: -O
|
||||
#![crate_type = "lib"]
|
||||
|
||||
// Test that LLVM can eliminate the impossible `i == 0` check.
|
||||
|
||||
// CHECK-LABEL: @issue_75546
|
||||
#[no_mangle]
|
||||
pub fn issue_75546() {
|
||||
let mut i = 1u32;
|
||||
while i < u32::MAX {
|
||||
// CHECK-NOT: panic
|
||||
if i == 0 { panic!(); }
|
||||
i += 1;
|
||||
}
|
||||
}
|
33
src/test/codegen/issue-77812.rs
Normal file
33
src/test/codegen/issue-77812.rs
Normal file
@ -0,0 +1,33 @@
|
||||
// min-llvm-version: 12.0.0
|
||||
// compile-flags: -O
|
||||
#![crate_type = "lib"]
|
||||
|
||||
// Test that LLVM can eliminate the unreachable `Variant::Zero` branch.
|
||||
|
||||
#[derive(Copy, Clone, Eq, PartialEq)]
|
||||
pub enum Variant {
|
||||
Zero,
|
||||
One,
|
||||
Two,
|
||||
}
|
||||
|
||||
extern {
|
||||
fn exf1();
|
||||
fn exf2();
|
||||
}
|
||||
|
||||
pub static mut GLOBAL: Variant = Variant::Zero;
|
||||
|
||||
// CHECK-LABEL: @issue_77812
|
||||
#[no_mangle]
|
||||
pub unsafe fn issue_77812() {
|
||||
let g = GLOBAL;
|
||||
if g != Variant::Zero {
|
||||
match g {
|
||||
Variant::One => exf1(),
|
||||
Variant::Two => exf2(),
|
||||
// CHECK-NOT: panic
|
||||
Variant::Zero => panic!(),
|
||||
}
|
||||
}
|
||||
}
|
21
src/test/ui/editions-crate-root-2015.rs
Normal file
21
src/test/ui/editions-crate-root-2015.rs
Normal file
@ -0,0 +1,21 @@
|
||||
// edition:2015
|
||||
|
||||
mod inner {
|
||||
fn global_inner(_: ::nonexistant::Foo) {
|
||||
//~^ ERROR failed to resolve: maybe a missing crate `nonexistant`?
|
||||
}
|
||||
fn crate_inner(_: crate::nonexistant::Foo) {
|
||||
//~^ ERROR failed to resolve: maybe a missing crate `nonexistant`?
|
||||
}
|
||||
|
||||
fn bare_global(_: ::nonexistant) {
|
||||
//~^ ERROR cannot find type `nonexistant` in the crate root
|
||||
}
|
||||
fn bare_crate(_: crate::nonexistant) {
|
||||
//~^ ERROR cannot find type `nonexistant` in the crate root
|
||||
}
|
||||
}
|
||||
|
||||
fn main() {
|
||||
|
||||
}
|
28
src/test/ui/editions-crate-root-2015.stderr
Normal file
28
src/test/ui/editions-crate-root-2015.stderr
Normal file
@ -0,0 +1,28 @@
|
||||
error[E0433]: failed to resolve: maybe a missing crate `nonexistant`?
|
||||
--> $DIR/editions-crate-root-2015.rs:4:26
|
||||
|
|
||||
LL | fn global_inner(_: ::nonexistant::Foo) {
|
||||
| ^^^^^^^^^^^ maybe a missing crate `nonexistant`?
|
||||
|
||||
error[E0433]: failed to resolve: maybe a missing crate `nonexistant`?
|
||||
--> $DIR/editions-crate-root-2015.rs:7:30
|
||||
|
|
||||
LL | fn crate_inner(_: crate::nonexistant::Foo) {
|
||||
| ^^^^^^^^^^^ maybe a missing crate `nonexistant`?
|
||||
|
||||
error[E0412]: cannot find type `nonexistant` in the crate root
|
||||
--> $DIR/editions-crate-root-2015.rs:11:25
|
||||
|
|
||||
LL | fn bare_global(_: ::nonexistant) {
|
||||
| ^^^^^^^^^^^ not found in the crate root
|
||||
|
||||
error[E0412]: cannot find type `nonexistant` in the crate root
|
||||
--> $DIR/editions-crate-root-2015.rs:14:29
|
||||
|
|
||||
LL | fn bare_crate(_: crate::nonexistant) {
|
||||
| ^^^^^^^^^^^ not found in the crate root
|
||||
|
||||
error: aborting due to 4 previous errors
|
||||
|
||||
Some errors have detailed explanations: E0412, E0433.
|
||||
For more information about an error, try `rustc --explain E0412`.
|
21
src/test/ui/editions-crate-root-2018.rs
Normal file
21
src/test/ui/editions-crate-root-2018.rs
Normal file
@ -0,0 +1,21 @@
|
||||
// edition:2018
|
||||
|
||||
mod inner {
|
||||
fn global_inner(_: ::nonexistant::Foo) {
|
||||
//~^ ERROR failed to resolve: could not find `nonexistant` in the list of imported crates
|
||||
}
|
||||
fn crate_inner(_: crate::nonexistant::Foo) {
|
||||
//~^ ERROR failed to resolve: could not find `nonexistant` in the crate root
|
||||
}
|
||||
|
||||
fn bare_global(_: ::nonexistant) {
|
||||
//~^ ERROR cannot find crate `nonexistant` in the list of imported crates
|
||||
}
|
||||
fn bare_crate(_: crate::nonexistant) {
|
||||
//~^ ERROR cannot find type `nonexistant` in the crate root
|
||||
}
|
||||
}
|
||||
|
||||
fn main() {
|
||||
|
||||
}
|
28
src/test/ui/editions-crate-root-2018.stderr
Normal file
28
src/test/ui/editions-crate-root-2018.stderr
Normal file
@ -0,0 +1,28 @@
|
||||
error[E0433]: failed to resolve: could not find `nonexistant` in the list of imported crates
|
||||
--> $DIR/editions-crate-root-2018.rs:4:26
|
||||
|
|
||||
LL | fn global_inner(_: ::nonexistant::Foo) {
|
||||
| ^^^^^^^^^^^ could not find `nonexistant` in the list of imported crates
|
||||
|
||||
error[E0433]: failed to resolve: could not find `nonexistant` in the crate root
|
||||
--> $DIR/editions-crate-root-2018.rs:7:30
|
||||
|
|
||||
LL | fn crate_inner(_: crate::nonexistant::Foo) {
|
||||
| ^^^^^^^^^^^ could not find `nonexistant` in the crate root
|
||||
|
||||
error[E0412]: cannot find crate `nonexistant` in the list of imported crates
|
||||
--> $DIR/editions-crate-root-2018.rs:11:25
|
||||
|
|
||||
LL | fn bare_global(_: ::nonexistant) {
|
||||
| ^^^^^^^^^^^ not found in the list of imported crates
|
||||
|
||||
error[E0412]: cannot find type `nonexistant` in the crate root
|
||||
--> $DIR/editions-crate-root-2018.rs:14:29
|
||||
|
|
||||
LL | fn bare_crate(_: crate::nonexistant) {
|
||||
| ^^^^^^^^^^^ not found in the crate root
|
||||
|
||||
error: aborting due to 4 previous errors
|
||||
|
||||
Some errors have detailed explanations: E0412, E0433.
|
||||
For more information about an error, try `rustc --explain E0412`.
|
@ -2,7 +2,7 @@ error[E0432]: unresolved import `E`
|
||||
--> $DIR/edition-imports-virtual-2015-gated.rs:8:5
|
||||
|
|
||||
LL | gen_gated!();
|
||||
| ^^^^^^^^^^^^^ could not find `E` in crate root
|
||||
| ^^^^^^^^^^^^^ could not find `E` in the list of imported crates
|
||||
|
|
||||
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
|
@ -60,7 +60,8 @@ warning: literal out of range for `i8`
|
||||
LL | let fail = -0b1111_1111i8;
|
||||
| ^^^^^^^^^^^^^ help: consider using the type `i16` instead: `0b1111_1111i16`
|
||||
|
|
||||
= note: the literal `0b1111_1111i8` (decimal `255`) does not fit into the type `i8` and will become `-1i8`
|
||||
= note: the literal `0b1111_1111i8` (decimal `255`) does not fit into the type `i8`
|
||||
= note: and the value `-0b1111_1111i8` will become `1i8`
|
||||
|
||||
warning: 7 warnings emitted
|
||||
|
||||
|
@ -4,8 +4,7 @@ error: `let` expressions are not supported here
|
||||
LL | if true && let x = 1 {
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: only supported directly in conditions of `if`- and `while`-expressions
|
||||
= note: as well as when nested within `&&` and parenthesis in those conditions
|
||||
= note: only supported directly without parentheses in conditions of `if`- and `while`-expressions, as well as in `let` chains within parentheses
|
||||
|
||||
warning: the feature `let_chains` is incomplete and may not be safe to use and/or cause compiler crashes
|
||||
--> $DIR/issue-82290.rs:1:12
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Regression test for issue #63882.
|
||||
|
||||
type A = crate::r#break; //~ ERROR cannot find type `r#break` in module `crate`
|
||||
type A = crate::r#break; //~ ERROR cannot find type `r#break` in the crate root
|
||||
|
||||
fn main() {}
|
||||
|
@ -1,8 +1,8 @@
|
||||
error[E0412]: cannot find type `r#break` in module `crate`
|
||||
error[E0412]: cannot find type `r#break` in the crate root
|
||||
--> $DIR/raw-ident-in-path.rs:3:17
|
||||
|
|
||||
LL | type A = crate::r#break;
|
||||
| ^^^^^^^ not found in `crate`
|
||||
| ^^^^^^^ not found in the crate root
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
@ -2,5 +2,5 @@
|
||||
|
||||
fn main() {
|
||||
let s = ::xcrate::S;
|
||||
//~^ ERROR failed to resolve: could not find `xcrate` in crate root
|
||||
//~^ ERROR failed to resolve: could not find `xcrate` in the list of imported crates
|
||||
}
|
||||
|
@ -1,8 +1,8 @@
|
||||
error[E0433]: failed to resolve: could not find `xcrate` in crate root
|
||||
error[E0433]: failed to resolve: could not find `xcrate` in the list of imported crates
|
||||
--> $DIR/non-existent-2.rs:4:15
|
||||
|
|
||||
LL | let s = ::xcrate::S;
|
||||
| ^^^^^^ could not find `xcrate` in crate root
|
||||
| ^^^^^^ could not find `xcrate` in the list of imported crates
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
@ -15,6 +15,7 @@ LL | () if let 0 = 1 => {}
|
||||
|
|
||||
= note: see issue #51114 <https://github.com/rust-lang/rust/issues/51114> for more information
|
||||
= help: add `#![feature(if_let_guard)]` to the crate attributes to enable
|
||||
= help: you can write `if matches!(<expr>, <pattern>)` instead of `if let <pattern> = <expr>`
|
||||
|
||||
error[E0658]: `if let` guards are experimental
|
||||
--> $DIR/feature-gate.rs:76:12
|
||||
@ -24,6 +25,7 @@ LL | () if let 0 = 1 => {}
|
||||
|
|
||||
= note: see issue #51114 <https://github.com/rust-lang/rust/issues/51114> for more information
|
||||
= help: add `#![feature(if_let_guard)]` to the crate attributes to enable
|
||||
= help: you can write `if matches!(<expr>, <pattern>)` instead of `if let <pattern> = <expr>`
|
||||
|
||||
error[E0658]: `let` expressions in this position are experimental
|
||||
--> $DIR/feature-gate.rs:10:16
|
||||
@ -33,6 +35,7 @@ LL | () if (let 0 = 1) => {}
|
||||
|
|
||||
= note: see issue #53667 <https://github.com/rust-lang/rust/issues/53667> for more information
|
||||
= help: add `#![feature(let_chains)]` to the crate attributes to enable
|
||||
= help: you can write `matches!(<expr>, <pattern>)` instead of `let <pattern> = <expr>`
|
||||
|
||||
error[E0658]: `let` expressions in this position are experimental
|
||||
--> $DIR/feature-gate.rs:14:18
|
||||
@ -42,6 +45,7 @@ LL | () if (((let 0 = 1))) => {}
|
||||
|
|
||||
= note: see issue #53667 <https://github.com/rust-lang/rust/issues/53667> for more information
|
||||
= help: add `#![feature(let_chains)]` to the crate attributes to enable
|
||||
= help: you can write `matches!(<expr>, <pattern>)` instead of `let <pattern> = <expr>`
|
||||
|
||||
error[E0658]: `let` expressions in this position are experimental
|
||||
--> $DIR/feature-gate.rs:18:23
|
||||
@ -51,6 +55,7 @@ LL | () if true && let 0 = 1 => {}
|
||||
|
|
||||
= note: see issue #53667 <https://github.com/rust-lang/rust/issues/53667> for more information
|
||||
= help: add `#![feature(let_chains)]` to the crate attributes to enable
|
||||
= help: you can write `matches!(<expr>, <pattern>)` instead of `let <pattern> = <expr>`
|
||||
|
||||
error[E0658]: `let` expressions in this position are experimental
|
||||
--> $DIR/feature-gate.rs:22:15
|
||||
@ -60,6 +65,7 @@ LL | () if let 0 = 1 && true => {}
|
||||
|
|
||||
= note: see issue #53667 <https://github.com/rust-lang/rust/issues/53667> for more information
|
||||
= help: add `#![feature(let_chains)]` to the crate attributes to enable
|
||||
= help: you can write `matches!(<expr>, <pattern>)` instead of `let <pattern> = <expr>`
|
||||
|
||||
error[E0658]: `let` expressions in this position are experimental
|
||||
--> $DIR/feature-gate.rs:26:16
|
||||
@ -69,6 +75,7 @@ LL | () if (let 0 = 1) && true => {}
|
||||
|
|
||||
= note: see issue #53667 <https://github.com/rust-lang/rust/issues/53667> for more information
|
||||
= help: add `#![feature(let_chains)]` to the crate attributes to enable
|
||||
= help: you can write `matches!(<expr>, <pattern>)` instead of `let <pattern> = <expr>`
|
||||
|
||||
error[E0658]: `let` expressions in this position are experimental
|
||||
--> $DIR/feature-gate.rs:30:24
|
||||
@ -78,6 +85,7 @@ LL | () if true && (let 0 = 1) => {}
|
||||
|
|
||||
= note: see issue #53667 <https://github.com/rust-lang/rust/issues/53667> for more information
|
||||
= help: add `#![feature(let_chains)]` to the crate attributes to enable
|
||||
= help: you can write `matches!(<expr>, <pattern>)` instead of `let <pattern> = <expr>`
|
||||
|
||||
error[E0658]: `let` expressions in this position are experimental
|
||||
--> $DIR/feature-gate.rs:34:16
|
||||
@ -87,6 +95,7 @@ LL | () if (let 0 = 1) && (let 0 = 1) => {}
|
||||
|
|
||||
= note: see issue #53667 <https://github.com/rust-lang/rust/issues/53667> for more information
|
||||
= help: add `#![feature(let_chains)]` to the crate attributes to enable
|
||||
= help: you can write `matches!(<expr>, <pattern>)` instead of `let <pattern> = <expr>`
|
||||
|
||||
error[E0658]: `let` expressions in this position are experimental
|
||||
--> $DIR/feature-gate.rs:34:31
|
||||
@ -96,6 +105,7 @@ LL | () if (let 0 = 1) && (let 0 = 1) => {}
|
||||
|
|
||||
= note: see issue #53667 <https://github.com/rust-lang/rust/issues/53667> for more information
|
||||
= help: add `#![feature(let_chains)]` to the crate attributes to enable
|
||||
= help: you can write `matches!(<expr>, <pattern>)` instead of `let <pattern> = <expr>`
|
||||
|
||||
error[E0658]: `let` expressions in this position are experimental
|
||||
--> $DIR/feature-gate.rs:40:15
|
||||
@ -105,6 +115,7 @@ LL | () if let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 =
|
||||
|
|
||||
= note: see issue #53667 <https://github.com/rust-lang/rust/issues/53667> for more information
|
||||
= help: add `#![feature(let_chains)]` to the crate attributes to enable
|
||||
= help: you can write `matches!(<expr>, <pattern>)` instead of `let <pattern> = <expr>`
|
||||
|
||||
error[E0658]: `let` expressions in this position are experimental
|
||||
--> $DIR/feature-gate.rs:40:28
|
||||
@ -114,6 +125,7 @@ LL | () if let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 =
|
||||
|
|
||||
= note: see issue #53667 <https://github.com/rust-lang/rust/issues/53667> for more information
|
||||
= help: add `#![feature(let_chains)]` to the crate attributes to enable
|
||||
= help: you can write `matches!(<expr>, <pattern>)` instead of `let <pattern> = <expr>`
|
||||
|
||||
error[E0658]: `let` expressions in this position are experimental
|
||||
--> $DIR/feature-gate.rs:40:42
|
||||
@ -123,6 +135,7 @@ LL | () if let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 =
|
||||
|
|
||||
= note: see issue #53667 <https://github.com/rust-lang/rust/issues/53667> for more information
|
||||
= help: add `#![feature(let_chains)]` to the crate attributes to enable
|
||||
= help: you can write `matches!(<expr>, <pattern>)` instead of `let <pattern> = <expr>`
|
||||
|
||||
error[E0658]: `let` expressions in this position are experimental
|
||||
--> $DIR/feature-gate.rs:40:55
|
||||
@ -132,6 +145,7 @@ LL | () if let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 =
|
||||
|
|
||||
= note: see issue #53667 <https://github.com/rust-lang/rust/issues/53667> for more information
|
||||
= help: add `#![feature(let_chains)]` to the crate attributes to enable
|
||||
= help: you can write `matches!(<expr>, <pattern>)` instead of `let <pattern> = <expr>`
|
||||
|
||||
error[E0658]: `let` expressions in this position are experimental
|
||||
--> $DIR/feature-gate.rs:40:68
|
||||
@ -141,6 +155,7 @@ LL | () if let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 =
|
||||
|
|
||||
= note: see issue #53667 <https://github.com/rust-lang/rust/issues/53667> for more information
|
||||
= help: add `#![feature(let_chains)]` to the crate attributes to enable
|
||||
= help: you can write `matches!(<expr>, <pattern>)` instead of `let <pattern> = <expr>`
|
||||
|
||||
error[E0658]: `let` expressions in this position are experimental
|
||||
--> $DIR/feature-gate.rs:52:15
|
||||
@ -150,6 +165,7 @@ LL | () if let Range { start: _, end: _ } = (true..true) && false => {}
|
||||
|
|
||||
= note: see issue #53667 <https://github.com/rust-lang/rust/issues/53667> for more information
|
||||
= help: add `#![feature(let_chains)]` to the crate attributes to enable
|
||||
= help: you can write `matches!(<expr>, <pattern>)` instead of `let <pattern> = <expr>`
|
||||
|
||||
error[E0658]: `let` expressions in this position are experimental
|
||||
--> $DIR/feature-gate.rs:68:16
|
||||
@ -159,6 +175,7 @@ LL | use_expr!((let 0 = 1 && 0 == 0));
|
||||
|
|
||||
= note: see issue #53667 <https://github.com/rust-lang/rust/issues/53667> for more information
|
||||
= help: add `#![feature(let_chains)]` to the crate attributes to enable
|
||||
= help: you can write `matches!(<expr>, <pattern>)` instead of `let <pattern> = <expr>`
|
||||
|
||||
error[E0658]: `let` expressions in this position are experimental
|
||||
--> $DIR/feature-gate.rs:71:16
|
||||
@ -168,6 +185,7 @@ LL | use_expr!((let 0 = 1));
|
||||
|
|
||||
= note: see issue #53667 <https://github.com/rust-lang/rust/issues/53667> for more information
|
||||
= help: add `#![feature(let_chains)]` to the crate attributes to enable
|
||||
= help: you can write `matches!(<expr>, <pattern>)` instead of `let <pattern> = <expr>`
|
||||
|
||||
error: `let` expressions are not supported here
|
||||
--> $DIR/feature-gate.rs:10:16
|
||||
@ -175,8 +193,7 @@ error: `let` expressions are not supported here
|
||||
LL | () if (let 0 = 1) => {}
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: only supported directly in conditions of `if`- and `while`-expressions
|
||||
= note: as well as when nested within `&&` and parenthesis in those conditions
|
||||
= note: only supported directly without parentheses in conditions of `if`- and `while`-expressions, as well as in `let` chains within parentheses
|
||||
|
||||
error: `let` expressions are not supported here
|
||||
--> $DIR/feature-gate.rs:14:18
|
||||
@ -184,8 +201,7 @@ error: `let` expressions are not supported here
|
||||
LL | () if (((let 0 = 1))) => {}
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: only supported directly in conditions of `if`- and `while`-expressions
|
||||
= note: as well as when nested within `&&` and parenthesis in those conditions
|
||||
= note: only supported directly without parentheses in conditions of `if`- and `while`-expressions, as well as in `let` chains within parentheses
|
||||
|
||||
error: `let` expressions are not supported here
|
||||
--> $DIR/feature-gate.rs:18:23
|
||||
@ -193,8 +209,7 @@ error: `let` expressions are not supported here
|
||||
LL | () if true && let 0 = 1 => {}
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: only supported directly in conditions of `if`- and `while`-expressions
|
||||
= note: as well as when nested within `&&` and parenthesis in those conditions
|
||||
= note: only supported directly without parentheses in conditions of `if`- and `while`-expressions, as well as in `let` chains within parentheses
|
||||
|
||||
error: `let` expressions are not supported here
|
||||
--> $DIR/feature-gate.rs:22:15
|
||||
@ -202,8 +217,7 @@ error: `let` expressions are not supported here
|
||||
LL | () if let 0 = 1 && true => {}
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: only supported directly in conditions of `if`- and `while`-expressions
|
||||
= note: as well as when nested within `&&` and parenthesis in those conditions
|
||||
= note: only supported directly without parentheses in conditions of `if`- and `while`-expressions, as well as in `let` chains within parentheses
|
||||
|
||||
error: `let` expressions are not supported here
|
||||
--> $DIR/feature-gate.rs:26:16
|
||||
@ -211,8 +225,7 @@ error: `let` expressions are not supported here
|
||||
LL | () if (let 0 = 1) && true => {}
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: only supported directly in conditions of `if`- and `while`-expressions
|
||||
= note: as well as when nested within `&&` and parenthesis in those conditions
|
||||
= note: only supported directly without parentheses in conditions of `if`- and `while`-expressions, as well as in `let` chains within parentheses
|
||||
|
||||
error: `let` expressions are not supported here
|
||||
--> $DIR/feature-gate.rs:30:24
|
||||
@ -220,8 +233,7 @@ error: `let` expressions are not supported here
|
||||
LL | () if true && (let 0 = 1) => {}
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: only supported directly in conditions of `if`- and `while`-expressions
|
||||
= note: as well as when nested within `&&` and parenthesis in those conditions
|
||||
= note: only supported directly without parentheses in conditions of `if`- and `while`-expressions, as well as in `let` chains within parentheses
|
||||
|
||||
error: `let` expressions are not supported here
|
||||
--> $DIR/feature-gate.rs:34:16
|
||||
@ -229,8 +241,7 @@ error: `let` expressions are not supported here
|
||||
LL | () if (let 0 = 1) && (let 0 = 1) => {}
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: only supported directly in conditions of `if`- and `while`-expressions
|
||||
= note: as well as when nested within `&&` and parenthesis in those conditions
|
||||
= note: only supported directly without parentheses in conditions of `if`- and `while`-expressions, as well as in `let` chains within parentheses
|
||||
|
||||
error: `let` expressions are not supported here
|
||||
--> $DIR/feature-gate.rs:34:31
|
||||
@ -238,8 +249,7 @@ error: `let` expressions are not supported here
|
||||
LL | () if (let 0 = 1) && (let 0 = 1) => {}
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: only supported directly in conditions of `if`- and `while`-expressions
|
||||
= note: as well as when nested within `&&` and parenthesis in those conditions
|
||||
= note: only supported directly without parentheses in conditions of `if`- and `while`-expressions, as well as in `let` chains within parentheses
|
||||
|
||||
error: `let` expressions are not supported here
|
||||
--> $DIR/feature-gate.rs:40:15
|
||||
@ -247,8 +257,7 @@ error: `let` expressions are not supported here
|
||||
LL | () if let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 = 5) => {}
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: only supported directly in conditions of `if`- and `while`-expressions
|
||||
= note: as well as when nested within `&&` and parenthesis in those conditions
|
||||
= note: only supported directly without parentheses in conditions of `if`- and `while`-expressions, as well as in `let` chains within parentheses
|
||||
|
||||
error: `let` expressions are not supported here
|
||||
--> $DIR/feature-gate.rs:40:28
|
||||
@ -256,8 +265,7 @@ error: `let` expressions are not supported here
|
||||
LL | () if let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 = 5) => {}
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: only supported directly in conditions of `if`- and `while`-expressions
|
||||
= note: as well as when nested within `&&` and parenthesis in those conditions
|
||||
= note: only supported directly without parentheses in conditions of `if`- and `while`-expressions, as well as in `let` chains within parentheses
|
||||
|
||||
error: `let` expressions are not supported here
|
||||
--> $DIR/feature-gate.rs:40:42
|
||||
@ -265,8 +273,7 @@ error: `let` expressions are not supported here
|
||||
LL | () if let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 = 5) => {}
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: only supported directly in conditions of `if`- and `while`-expressions
|
||||
= note: as well as when nested within `&&` and parenthesis in those conditions
|
||||
= note: only supported directly without parentheses in conditions of `if`- and `while`-expressions, as well as in `let` chains within parentheses
|
||||
|
||||
error: `let` expressions are not supported here
|
||||
--> $DIR/feature-gate.rs:40:55
|
||||
@ -274,8 +281,7 @@ error: `let` expressions are not supported here
|
||||
LL | () if let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 = 5) => {}
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: only supported directly in conditions of `if`- and `while`-expressions
|
||||
= note: as well as when nested within `&&` and parenthesis in those conditions
|
||||
= note: only supported directly without parentheses in conditions of `if`- and `while`-expressions, as well as in `let` chains within parentheses
|
||||
|
||||
error: `let` expressions are not supported here
|
||||
--> $DIR/feature-gate.rs:40:68
|
||||
@ -283,8 +289,7 @@ error: `let` expressions are not supported here
|
||||
LL | () if let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 = 5) => {}
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: only supported directly in conditions of `if`- and `while`-expressions
|
||||
= note: as well as when nested within `&&` and parenthesis in those conditions
|
||||
= note: only supported directly without parentheses in conditions of `if`- and `while`-expressions, as well as in `let` chains within parentheses
|
||||
|
||||
error: `let` expressions are not supported here
|
||||
--> $DIR/feature-gate.rs:52:15
|
||||
@ -292,8 +297,7 @@ error: `let` expressions are not supported here
|
||||
LL | () if let Range { start: _, end: _ } = (true..true) && false => {}
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: only supported directly in conditions of `if`- and `while`-expressions
|
||||
= note: as well as when nested within `&&` and parenthesis in those conditions
|
||||
= note: only supported directly without parentheses in conditions of `if`- and `while`-expressions, as well as in `let` chains within parentheses
|
||||
|
||||
error: `let` expressions are not supported here
|
||||
--> $DIR/feature-gate.rs:68:16
|
||||
@ -301,8 +305,7 @@ error: `let` expressions are not supported here
|
||||
LL | use_expr!((let 0 = 1 && 0 == 0));
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: only supported directly in conditions of `if`- and `while`-expressions
|
||||
= note: as well as when nested within `&&` and parenthesis in those conditions
|
||||
= note: only supported directly without parentheses in conditions of `if`- and `while`-expressions, as well as in `let` chains within parentheses
|
||||
|
||||
error: `let` expressions are not supported here
|
||||
--> $DIR/feature-gate.rs:71:16
|
||||
@ -310,8 +313,7 @@ error: `let` expressions are not supported here
|
||||
LL | use_expr!((let 0 = 1));
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: only supported directly in conditions of `if`- and `while`-expressions
|
||||
= note: as well as when nested within `&&` and parenthesis in those conditions
|
||||
= note: only supported directly without parentheses in conditions of `if`- and `while`-expressions, as well as in `let` chains within parentheses
|
||||
|
||||
error: aborting due to 35 previous errors
|
||||
|
||||
|
@ -15,8 +15,7 @@ error: `let` expressions are not supported here
|
||||
LL | if &let 0 = 0 {}
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: only supported directly in conditions of `if`- and `while`-expressions
|
||||
= note: as well as when nested within `&&` and parenthesis in those conditions
|
||||
= note: only supported directly without parentheses in conditions of `if`- and `while`-expressions, as well as in `let` chains within parentheses
|
||||
|
||||
error: `let` expressions are not supported here
|
||||
--> $DIR/disallowed-positions.rs:35:9
|
||||
@ -24,8 +23,7 @@ error: `let` expressions are not supported here
|
||||
LL | if !let 0 = 0 {}
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: only supported directly in conditions of `if`- and `while`-expressions
|
||||
= note: as well as when nested within `&&` and parenthesis in those conditions
|
||||
= note: only supported directly without parentheses in conditions of `if`- and `while`-expressions, as well as in `let` chains within parentheses
|
||||
|
||||
error: `let` expressions are not supported here
|
||||
--> $DIR/disallowed-positions.rs:36:9
|
||||
@ -33,8 +31,7 @@ error: `let` expressions are not supported here
|
||||
LL | if *let 0 = 0 {}
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: only supported directly in conditions of `if`- and `while`-expressions
|
||||
= note: as well as when nested within `&&` and parenthesis in those conditions
|
||||
= note: only supported directly without parentheses in conditions of `if`- and `while`-expressions, as well as in `let` chains within parentheses
|
||||
|
||||
error: `let` expressions are not supported here
|
||||
--> $DIR/disallowed-positions.rs:38:9
|
||||
@ -42,8 +39,7 @@ error: `let` expressions are not supported here
|
||||
LL | if -let 0 = 0 {}
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: only supported directly in conditions of `if`- and `while`-expressions
|
||||
= note: as well as when nested within `&&` and parenthesis in those conditions
|
||||
= note: only supported directly without parentheses in conditions of `if`- and `while`-expressions, as well as in `let` chains within parentheses
|
||||
|
||||
error: `let` expressions are not supported here
|
||||
--> $DIR/disallowed-positions.rs:46:9
|
||||
@ -51,8 +47,7 @@ error: `let` expressions are not supported here
|
||||
LL | if (let 0 = 0)? {}
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: only supported directly in conditions of `if`- and `while`-expressions
|
||||
= note: as well as when nested within `&&` and parenthesis in those conditions
|
||||
= note: only supported directly without parentheses in conditions of `if`- and `while`-expressions, as well as in `let` chains within parentheses
|
||||
|
||||
error: `let` expressions are not supported here
|
||||
--> $DIR/disallowed-positions.rs:50:16
|
||||
@ -60,8 +55,7 @@ error: `let` expressions are not supported here
|
||||
LL | if true || let 0 = 0 {}
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: only supported directly in conditions of `if`- and `while`-expressions
|
||||
= note: as well as when nested within `&&` and parenthesis in those conditions
|
||||
= note: only supported directly without parentheses in conditions of `if`- and `while`-expressions, as well as in `let` chains within parentheses
|
||||
|
||||
error: `let` expressions are not supported here
|
||||
--> $DIR/disallowed-positions.rs:51:17
|
||||
@ -69,8 +63,7 @@ error: `let` expressions are not supported here
|
||||
LL | if (true || let 0 = 0) {}
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: only supported directly in conditions of `if`- and `while`-expressions
|
||||
= note: as well as when nested within `&&` and parenthesis in those conditions
|
||||
= note: only supported directly without parentheses in conditions of `if`- and `while`-expressions, as well as in `let` chains within parentheses
|
||||
|
||||
error: `let` expressions are not supported here
|
||||
--> $DIR/disallowed-positions.rs:52:25
|
||||
@ -78,8 +71,7 @@ error: `let` expressions are not supported here
|
||||
LL | if true && (true || let 0 = 0) {}
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: only supported directly in conditions of `if`- and `while`-expressions
|
||||
= note: as well as when nested within `&&` and parenthesis in those conditions
|
||||
= note: only supported directly without parentheses in conditions of `if`- and `while`-expressions, as well as in `let` chains within parentheses
|
||||
|
||||
error: `let` expressions are not supported here
|
||||
--> $DIR/disallowed-positions.rs:53:25
|
||||
@ -87,8 +79,7 @@ error: `let` expressions are not supported here
|
||||
LL | if true || (true && let 0 = 0) {}
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: only supported directly in conditions of `if`- and `while`-expressions
|
||||
= note: as well as when nested within `&&` and parenthesis in those conditions
|
||||
= note: only supported directly without parentheses in conditions of `if`- and `while`-expressions, as well as in `let` chains within parentheses
|
||||
|
||||
error: `let` expressions are not supported here
|
||||
--> $DIR/disallowed-positions.rs:56:12
|
||||
@ -96,8 +87,7 @@ error: `let` expressions are not supported here
|
||||
LL | if x = let 0 = 0 {}
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: only supported directly in conditions of `if`- and `while`-expressions
|
||||
= note: as well as when nested within `&&` and parenthesis in those conditions
|
||||
= note: only supported directly without parentheses in conditions of `if`- and `while`-expressions, as well as in `let` chains within parentheses
|
||||
|
||||
error: `let` expressions are not supported here
|
||||
--> $DIR/disallowed-positions.rs:59:15
|
||||
@ -105,8 +95,7 @@ error: `let` expressions are not supported here
|
||||
LL | if true..(let 0 = 0) {}
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: only supported directly in conditions of `if`- and `while`-expressions
|
||||
= note: as well as when nested within `&&` and parenthesis in those conditions
|
||||
= note: only supported directly without parentheses in conditions of `if`- and `while`-expressions, as well as in `let` chains within parentheses
|
||||
|
||||
error: `let` expressions are not supported here
|
||||
--> $DIR/disallowed-positions.rs:61:11
|
||||
@ -114,8 +103,7 @@ error: `let` expressions are not supported here
|
||||
LL | if ..(let 0 = 0) {}
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: only supported directly in conditions of `if`- and `while`-expressions
|
||||
= note: as well as when nested within `&&` and parenthesis in those conditions
|
||||
= note: only supported directly without parentheses in conditions of `if`- and `while`-expressions, as well as in `let` chains within parentheses
|
||||
|
||||
error: `let` expressions are not supported here
|
||||
--> $DIR/disallowed-positions.rs:63:9
|
||||
@ -123,8 +111,7 @@ error: `let` expressions are not supported here
|
||||
LL | if (let 0 = 0).. {}
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: only supported directly in conditions of `if`- and `while`-expressions
|
||||
= note: as well as when nested within `&&` and parenthesis in those conditions
|
||||
= note: only supported directly without parentheses in conditions of `if`- and `while`-expressions, as well as in `let` chains within parentheses
|
||||
|
||||
error: `let` expressions are not supported here
|
||||
--> $DIR/disallowed-positions.rs:67:8
|
||||
@ -132,8 +119,7 @@ error: `let` expressions are not supported here
|
||||
LL | if let Range { start: _, end: _ } = true..true && false {}
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: only supported directly in conditions of `if`- and `while`-expressions
|
||||
= note: as well as when nested within `&&` and parenthesis in those conditions
|
||||
= note: only supported directly without parentheses in conditions of `if`- and `while`-expressions, as well as in `let` chains within parentheses
|
||||
|
||||
error: `let` expressions are not supported here
|
||||
--> $DIR/disallowed-positions.rs:71:8
|
||||
@ -141,8 +127,7 @@ error: `let` expressions are not supported here
|
||||
LL | if let Range { start: _, end: _ } = true..true || false {}
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: only supported directly in conditions of `if`- and `while`-expressions
|
||||
= note: as well as when nested within `&&` and parenthesis in those conditions
|
||||
= note: only supported directly without parentheses in conditions of `if`- and `while`-expressions, as well as in `let` chains within parentheses
|
||||
|
||||
error: `let` expressions are not supported here
|
||||
--> $DIR/disallowed-positions.rs:78:8
|
||||
@ -150,8 +135,7 @@ error: `let` expressions are not supported here
|
||||
LL | if let Range { start: F, end } = F..|| true {}
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: only supported directly in conditions of `if`- and `while`-expressions
|
||||
= note: as well as when nested within `&&` and parenthesis in those conditions
|
||||
= note: only supported directly without parentheses in conditions of `if`- and `while`-expressions, as well as in `let` chains within parentheses
|
||||
|
||||
error: `let` expressions are not supported here
|
||||
--> $DIR/disallowed-positions.rs:86:8
|
||||
@ -159,8 +143,7 @@ error: `let` expressions are not supported here
|
||||
LL | if let Range { start: true, end } = t..&&false {}
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: only supported directly in conditions of `if`- and `while`-expressions
|
||||
= note: as well as when nested within `&&` and parenthesis in those conditions
|
||||
= note: only supported directly without parentheses in conditions of `if`- and `while`-expressions, as well as in `let` chains within parentheses
|
||||
|
||||
error: `let` expressions are not supported here
|
||||
--> $DIR/disallowed-positions.rs:92:19
|
||||
@ -168,8 +151,7 @@ error: `let` expressions are not supported here
|
||||
LL | if let true = let true = true {}
|
||||
| ^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: only supported directly in conditions of `if`- and `while`-expressions
|
||||
= note: as well as when nested within `&&` and parenthesis in those conditions
|
||||
= note: only supported directly without parentheses in conditions of `if`- and `while`-expressions, as well as in `let` chains within parentheses
|
||||
|
||||
error: `let` expressions are not supported here
|
||||
--> $DIR/disallowed-positions.rs:96:12
|
||||
@ -177,8 +159,7 @@ error: `let` expressions are not supported here
|
||||
LL | while &let 0 = 0 {}
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: only supported directly in conditions of `if`- and `while`-expressions
|
||||
= note: as well as when nested within `&&` and parenthesis in those conditions
|
||||
= note: only supported directly without parentheses in conditions of `if`- and `while`-expressions, as well as in `let` chains within parentheses
|
||||
|
||||
error: `let` expressions are not supported here
|
||||
--> $DIR/disallowed-positions.rs:99:12
|
||||
@ -186,8 +167,7 @@ error: `let` expressions are not supported here
|
||||
LL | while !let 0 = 0 {}
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: only supported directly in conditions of `if`- and `while`-expressions
|
||||
= note: as well as when nested within `&&` and parenthesis in those conditions
|
||||
= note: only supported directly without parentheses in conditions of `if`- and `while`-expressions, as well as in `let` chains within parentheses
|
||||
|
||||
error: `let` expressions are not supported here
|
||||
--> $DIR/disallowed-positions.rs:100:12
|
||||
@ -195,8 +175,7 @@ error: `let` expressions are not supported here
|
||||
LL | while *let 0 = 0 {}
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: only supported directly in conditions of `if`- and `while`-expressions
|
||||
= note: as well as when nested within `&&` and parenthesis in those conditions
|
||||
= note: only supported directly without parentheses in conditions of `if`- and `while`-expressions, as well as in `let` chains within parentheses
|
||||
|
||||
error: `let` expressions are not supported here
|
||||
--> $DIR/disallowed-positions.rs:102:12
|
||||
@ -204,8 +183,7 @@ error: `let` expressions are not supported here
|
||||
LL | while -let 0 = 0 {}
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: only supported directly in conditions of `if`- and `while`-expressions
|
||||
= note: as well as when nested within `&&` and parenthesis in those conditions
|
||||
= note: only supported directly without parentheses in conditions of `if`- and `while`-expressions, as well as in `let` chains within parentheses
|
||||
|
||||
error: `let` expressions are not supported here
|
||||
--> $DIR/disallowed-positions.rs:110:12
|
||||
@ -213,8 +191,7 @@ error: `let` expressions are not supported here
|
||||
LL | while (let 0 = 0)? {}
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: only supported directly in conditions of `if`- and `while`-expressions
|
||||
= note: as well as when nested within `&&` and parenthesis in those conditions
|
||||
= note: only supported directly without parentheses in conditions of `if`- and `while`-expressions, as well as in `let` chains within parentheses
|
||||
|
||||
error: `let` expressions are not supported here
|
||||
--> $DIR/disallowed-positions.rs:114:19
|
||||
@ -222,8 +199,7 @@ error: `let` expressions are not supported here
|
||||
LL | while true || let 0 = 0 {}
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: only supported directly in conditions of `if`- and `while`-expressions
|
||||
= note: as well as when nested within `&&` and parenthesis in those conditions
|
||||
= note: only supported directly without parentheses in conditions of `if`- and `while`-expressions, as well as in `let` chains within parentheses
|
||||
|
||||
error: `let` expressions are not supported here
|
||||
--> $DIR/disallowed-positions.rs:115:20
|
||||
@ -231,8 +207,7 @@ error: `let` expressions are not supported here
|
||||
LL | while (true || let 0 = 0) {}
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: only supported directly in conditions of `if`- and `while`-expressions
|
||||
= note: as well as when nested within `&&` and parenthesis in those conditions
|
||||
= note: only supported directly without parentheses in conditions of `if`- and `while`-expressions, as well as in `let` chains within parentheses
|
||||
|
||||
error: `let` expressions are not supported here
|
||||
--> $DIR/disallowed-positions.rs:116:28
|
||||
@ -240,8 +215,7 @@ error: `let` expressions are not supported here
|
||||
LL | while true && (true || let 0 = 0) {}
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: only supported directly in conditions of `if`- and `while`-expressions
|
||||
= note: as well as when nested within `&&` and parenthesis in those conditions
|
||||
= note: only supported directly without parentheses in conditions of `if`- and `while`-expressions, as well as in `let` chains within parentheses
|
||||
|
||||
error: `let` expressions are not supported here
|
||||
--> $DIR/disallowed-positions.rs:117:28
|
||||
@ -249,8 +223,7 @@ error: `let` expressions are not supported here
|
||||
LL | while true || (true && let 0 = 0) {}
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: only supported directly in conditions of `if`- and `while`-expressions
|
||||
= note: as well as when nested within `&&` and parenthesis in those conditions
|
||||
= note: only supported directly without parentheses in conditions of `if`- and `while`-expressions, as well as in `let` chains within parentheses
|
||||
|
||||
error: `let` expressions are not supported here
|
||||
--> $DIR/disallowed-positions.rs:120:15
|
||||
@ -258,8 +231,7 @@ error: `let` expressions are not supported here
|
||||
LL | while x = let 0 = 0 {}
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: only supported directly in conditions of `if`- and `while`-expressions
|
||||
= note: as well as when nested within `&&` and parenthesis in those conditions
|
||||
= note: only supported directly without parentheses in conditions of `if`- and `while`-expressions, as well as in `let` chains within parentheses
|
||||
|
||||
error: `let` expressions are not supported here
|
||||
--> $DIR/disallowed-positions.rs:123:18
|
||||
@ -267,8 +239,7 @@ error: `let` expressions are not supported here
|
||||
LL | while true..(let 0 = 0) {}
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: only supported directly in conditions of `if`- and `while`-expressions
|
||||
= note: as well as when nested within `&&` and parenthesis in those conditions
|
||||
= note: only supported directly without parentheses in conditions of `if`- and `while`-expressions, as well as in `let` chains within parentheses
|
||||
|
||||
error: `let` expressions are not supported here
|
||||
--> $DIR/disallowed-positions.rs:125:14
|
||||
@ -276,8 +247,7 @@ error: `let` expressions are not supported here
|
||||
LL | while ..(let 0 = 0) {}
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: only supported directly in conditions of `if`- and `while`-expressions
|
||||
= note: as well as when nested within `&&` and parenthesis in those conditions
|
||||
= note: only supported directly without parentheses in conditions of `if`- and `while`-expressions, as well as in `let` chains within parentheses
|
||||
|
||||
error: `let` expressions are not supported here
|
||||
--> $DIR/disallowed-positions.rs:127:12
|
||||
@ -285,8 +255,7 @@ error: `let` expressions are not supported here
|
||||
LL | while (let 0 = 0).. {}
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: only supported directly in conditions of `if`- and `while`-expressions
|
||||
= note: as well as when nested within `&&` and parenthesis in those conditions
|
||||
= note: only supported directly without parentheses in conditions of `if`- and `while`-expressions, as well as in `let` chains within parentheses
|
||||
|
||||
error: `let` expressions are not supported here
|
||||
--> $DIR/disallowed-positions.rs:131:11
|
||||
@ -294,8 +263,7 @@ error: `let` expressions are not supported here
|
||||
LL | while let Range { start: _, end: _ } = true..true && false {}
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: only supported directly in conditions of `if`- and `while`-expressions
|
||||
= note: as well as when nested within `&&` and parenthesis in those conditions
|
||||
= note: only supported directly without parentheses in conditions of `if`- and `while`-expressions, as well as in `let` chains within parentheses
|
||||
|
||||
error: `let` expressions are not supported here
|
||||
--> $DIR/disallowed-positions.rs:135:11
|
||||
@ -303,8 +271,7 @@ error: `let` expressions are not supported here
|
||||
LL | while let Range { start: _, end: _ } = true..true || false {}
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: only supported directly in conditions of `if`- and `while`-expressions
|
||||
= note: as well as when nested within `&&` and parenthesis in those conditions
|
||||
= note: only supported directly without parentheses in conditions of `if`- and `while`-expressions, as well as in `let` chains within parentheses
|
||||
|
||||
error: `let` expressions are not supported here
|
||||
--> $DIR/disallowed-positions.rs:142:11
|
||||
@ -312,8 +279,7 @@ error: `let` expressions are not supported here
|
||||
LL | while let Range { start: F, end } = F..|| true {}
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: only supported directly in conditions of `if`- and `while`-expressions
|
||||
= note: as well as when nested within `&&` and parenthesis in those conditions
|
||||
= note: only supported directly without parentheses in conditions of `if`- and `while`-expressions, as well as in `let` chains within parentheses
|
||||
|
||||
error: `let` expressions are not supported here
|
||||
--> $DIR/disallowed-positions.rs:150:11
|
||||
@ -321,8 +287,7 @@ error: `let` expressions are not supported here
|
||||
LL | while let Range { start: true, end } = t..&&false {}
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: only supported directly in conditions of `if`- and `while`-expressions
|
||||
= note: as well as when nested within `&&` and parenthesis in those conditions
|
||||
= note: only supported directly without parentheses in conditions of `if`- and `while`-expressions, as well as in `let` chains within parentheses
|
||||
|
||||
error: `let` expressions are not supported here
|
||||
--> $DIR/disallowed-positions.rs:156:22
|
||||
@ -330,8 +295,7 @@ error: `let` expressions are not supported here
|
||||
LL | while let true = let true = true {}
|
||||
| ^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: only supported directly in conditions of `if`- and `while`-expressions
|
||||
= note: as well as when nested within `&&` and parenthesis in those conditions
|
||||
= note: only supported directly without parentheses in conditions of `if`- and `while`-expressions, as well as in `let` chains within parentheses
|
||||
|
||||
error: `let` expressions are not supported here
|
||||
--> $DIR/disallowed-positions.rs:170:6
|
||||
@ -339,8 +303,7 @@ error: `let` expressions are not supported here
|
||||
LL | &let 0 = 0;
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: only supported directly in conditions of `if`- and `while`-expressions
|
||||
= note: as well as when nested within `&&` and parenthesis in those conditions
|
||||
= note: only supported directly without parentheses in conditions of `if`- and `while`-expressions, as well as in `let` chains within parentheses
|
||||
|
||||
error: `let` expressions are not supported here
|
||||
--> $DIR/disallowed-positions.rs:172:6
|
||||
@ -348,8 +311,7 @@ error: `let` expressions are not supported here
|
||||
LL | !let 0 = 0;
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: only supported directly in conditions of `if`- and `while`-expressions
|
||||
= note: as well as when nested within `&&` and parenthesis in those conditions
|
||||
= note: only supported directly without parentheses in conditions of `if`- and `while`-expressions, as well as in `let` chains within parentheses
|
||||
|
||||
error: `let` expressions are not supported here
|
||||
--> $DIR/disallowed-positions.rs:173:6
|
||||
@ -357,8 +319,7 @@ error: `let` expressions are not supported here
|
||||
LL | *let 0 = 0;
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: only supported directly in conditions of `if`- and `while`-expressions
|
||||
= note: as well as when nested within `&&` and parenthesis in those conditions
|
||||
= note: only supported directly without parentheses in conditions of `if`- and `while`-expressions, as well as in `let` chains within parentheses
|
||||
|
||||
error: `let` expressions are not supported here
|
||||
--> $DIR/disallowed-positions.rs:175:6
|
||||
@ -366,8 +327,7 @@ error: `let` expressions are not supported here
|
||||
LL | -let 0 = 0;
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: only supported directly in conditions of `if`- and `while`-expressions
|
||||
= note: as well as when nested within `&&` and parenthesis in those conditions
|
||||
= note: only supported directly without parentheses in conditions of `if`- and `while`-expressions, as well as in `let` chains within parentheses
|
||||
|
||||
error: `let` expressions are not supported here
|
||||
--> $DIR/disallowed-positions.rs:183:6
|
||||
@ -375,8 +335,7 @@ error: `let` expressions are not supported here
|
||||
LL | (let 0 = 0)?;
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: only supported directly in conditions of `if`- and `while`-expressions
|
||||
= note: as well as when nested within `&&` and parenthesis in those conditions
|
||||
= note: only supported directly without parentheses in conditions of `if`- and `while`-expressions, as well as in `let` chains within parentheses
|
||||
|
||||
error: `let` expressions are not supported here
|
||||
--> $DIR/disallowed-positions.rs:187:13
|
||||
@ -384,8 +343,7 @@ error: `let` expressions are not supported here
|
||||
LL | true || let 0 = 0;
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: only supported directly in conditions of `if`- and `while`-expressions
|
||||
= note: as well as when nested within `&&` and parenthesis in those conditions
|
||||
= note: only supported directly without parentheses in conditions of `if`- and `while`-expressions, as well as in `let` chains within parentheses
|
||||
|
||||
error: `let` expressions are not supported here
|
||||
--> $DIR/disallowed-positions.rs:188:14
|
||||
@ -393,8 +351,7 @@ error: `let` expressions are not supported here
|
||||
LL | (true || let 0 = 0);
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: only supported directly in conditions of `if`- and `while`-expressions
|
||||
= note: as well as when nested within `&&` and parenthesis in those conditions
|
||||
= note: only supported directly without parentheses in conditions of `if`- and `while`-expressions, as well as in `let` chains within parentheses
|
||||
|
||||
error: `let` expressions are not supported here
|
||||
--> $DIR/disallowed-positions.rs:189:22
|
||||
@ -402,8 +359,7 @@ error: `let` expressions are not supported here
|
||||
LL | true && (true || let 0 = 0);
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: only supported directly in conditions of `if`- and `while`-expressions
|
||||
= note: as well as when nested within `&&` and parenthesis in those conditions
|
||||
= note: only supported directly without parentheses in conditions of `if`- and `while`-expressions, as well as in `let` chains within parentheses
|
||||
|
||||
error: `let` expressions are not supported here
|
||||
--> $DIR/disallowed-positions.rs:192:9
|
||||
@ -411,8 +367,7 @@ error: `let` expressions are not supported here
|
||||
LL | x = let 0 = 0;
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: only supported directly in conditions of `if`- and `while`-expressions
|
||||
= note: as well as when nested within `&&` and parenthesis in those conditions
|
||||
= note: only supported directly without parentheses in conditions of `if`- and `while`-expressions, as well as in `let` chains within parentheses
|
||||
|
||||
error: `let` expressions are not supported here
|
||||
--> $DIR/disallowed-positions.rs:194:12
|
||||
@ -420,8 +375,7 @@ error: `let` expressions are not supported here
|
||||
LL | true..(let 0 = 0);
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: only supported directly in conditions of `if`- and `while`-expressions
|
||||
= note: as well as when nested within `&&` and parenthesis in those conditions
|
||||
= note: only supported directly without parentheses in conditions of `if`- and `while`-expressions, as well as in `let` chains within parentheses
|
||||
|
||||
error: `let` expressions are not supported here
|
||||
--> $DIR/disallowed-positions.rs:195:8
|
||||
@ -429,8 +383,7 @@ error: `let` expressions are not supported here
|
||||
LL | ..(let 0 = 0);
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: only supported directly in conditions of `if`- and `while`-expressions
|
||||
= note: as well as when nested within `&&` and parenthesis in those conditions
|
||||
= note: only supported directly without parentheses in conditions of `if`- and `while`-expressions, as well as in `let` chains within parentheses
|
||||
|
||||
error: `let` expressions are not supported here
|
||||
--> $DIR/disallowed-positions.rs:196:6
|
||||
@ -438,8 +391,7 @@ error: `let` expressions are not supported here
|
||||
LL | (let 0 = 0)..;
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: only supported directly in conditions of `if`- and `while`-expressions
|
||||
= note: as well as when nested within `&&` and parenthesis in those conditions
|
||||
= note: only supported directly without parentheses in conditions of `if`- and `while`-expressions, as well as in `let` chains within parentheses
|
||||
|
||||
error: `let` expressions are not supported here
|
||||
--> $DIR/disallowed-positions.rs:198:6
|
||||
@ -447,8 +399,7 @@ error: `let` expressions are not supported here
|
||||
LL | (let Range { start: _, end: _ } = true..true || false);
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: only supported directly in conditions of `if`- and `while`-expressions
|
||||
= note: as well as when nested within `&&` and parenthesis in those conditions
|
||||
= note: only supported directly without parentheses in conditions of `if`- and `while`-expressions, as well as in `let` chains within parentheses
|
||||
|
||||
error: `let` expressions are not supported here
|
||||
--> $DIR/disallowed-positions.rs:202:6
|
||||
@ -456,8 +407,7 @@ error: `let` expressions are not supported here
|
||||
LL | (let true = let true = true);
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: only supported directly in conditions of `if`- and `while`-expressions
|
||||
= note: as well as when nested within `&&` and parenthesis in those conditions
|
||||
= note: only supported directly without parentheses in conditions of `if`- and `while`-expressions, as well as in `let` chains within parentheses
|
||||
|
||||
error: `let` expressions are not supported here
|
||||
--> $DIR/disallowed-positions.rs:202:17
|
||||
@ -465,8 +415,7 @@ error: `let` expressions are not supported here
|
||||
LL | (let true = let true = true);
|
||||
| ^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: only supported directly in conditions of `if`- and `while`-expressions
|
||||
= note: as well as when nested within `&&` and parenthesis in those conditions
|
||||
= note: only supported directly without parentheses in conditions of `if`- and `while`-expressions, as well as in `let` chains within parentheses
|
||||
|
||||
error: `let` expressions are not supported here
|
||||
--> $DIR/disallowed-positions.rs:207:6
|
||||
@ -474,8 +423,7 @@ error: `let` expressions are not supported here
|
||||
LL | &let 0 = 0
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: only supported directly in conditions of `if`- and `while`-expressions
|
||||
= note: as well as when nested within `&&` and parenthesis in those conditions
|
||||
= note: only supported directly without parentheses in conditions of `if`- and `while`-expressions, as well as in `let` chains within parentheses
|
||||
|
||||
error: `let` expressions are not supported here
|
||||
--> $DIR/disallowed-positions.rs:218:17
|
||||
@ -483,8 +431,7 @@ error: `let` expressions are not supported here
|
||||
LL | true && let 1 = 1
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: only supported directly in conditions of `if`- and `while`-expressions
|
||||
= note: as well as when nested within `&&` and parenthesis in those conditions
|
||||
= note: only supported directly without parentheses in conditions of `if`- and `while`-expressions, as well as in `let` chains within parentheses
|
||||
|
||||
error: `let` expressions are not supported here
|
||||
--> $DIR/disallowed-positions.rs:222:17
|
||||
@ -492,8 +439,7 @@ error: `let` expressions are not supported here
|
||||
LL | true && let 1 = 1
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: only supported directly in conditions of `if`- and `while`-expressions
|
||||
= note: as well as when nested within `&&` and parenthesis in those conditions
|
||||
= note: only supported directly without parentheses in conditions of `if`- and `while`-expressions, as well as in `let` chains within parentheses
|
||||
|
||||
error: `let` expressions are not supported here
|
||||
--> $DIR/disallowed-positions.rs:226:17
|
||||
@ -501,8 +447,7 @@ error: `let` expressions are not supported here
|
||||
LL | true && let 1 = 1
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: only supported directly in conditions of `if`- and `while`-expressions
|
||||
= note: as well as when nested within `&&` and parenthesis in those conditions
|
||||
= note: only supported directly without parentheses in conditions of `if`- and `while`-expressions, as well as in `let` chains within parentheses
|
||||
|
||||
error: `let` expressions are not supported here
|
||||
--> $DIR/disallowed-positions.rs:236:17
|
||||
@ -510,8 +455,7 @@ error: `let` expressions are not supported here
|
||||
LL | true && let 1 = 1
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: only supported directly in conditions of `if`- and `while`-expressions
|
||||
= note: as well as when nested within `&&` and parenthesis in those conditions
|
||||
= note: only supported directly without parentheses in conditions of `if`- and `while`-expressions, as well as in `let` chains within parentheses
|
||||
|
||||
warning: the feature `const_generics` is incomplete and may not be safe to use and/or cause compiler crashes
|
||||
--> $DIR/disallowed-positions.rs:20:12
|
||||
|
@ -13,11 +13,11 @@ fn _if() {
|
||||
|
||||
if (let 0 = 1) {}
|
||||
//~^ ERROR `let` expressions in this position are experimental [E0658]
|
||||
//~| ERROR `let` expressions are not supported here
|
||||
//~| ERROR invalid parentheses around `let` expression in `if let`
|
||||
|
||||
if (((let 0 = 1))) {}
|
||||
//~^ ERROR `let` expressions in this position are experimental [E0658]
|
||||
//~| ERROR `let` expressions are not supported here
|
||||
//~| ERROR invalid parentheses around `let` expression in `if let`
|
||||
|
||||
if true && let 0 = 1 {}
|
||||
//~^ ERROR `let` expressions in this position are experimental [E0658]
|
||||
@ -126,7 +126,7 @@ macro_rules! use_expr {
|
||||
//~| ERROR `let` expressions are not supported here
|
||||
use_expr!((let 0 = 1));
|
||||
//~^ ERROR `let` expressions in this position are experimental [E0658]
|
||||
//~| ERROR `let` expressions are not supported here
|
||||
//~| ERROR invalid parentheses around `let` expression in `if let`
|
||||
//~| ERROR `let` expressions are not supported here
|
||||
#[cfg(FALSE)] (let 0 = 1);
|
||||
//~^ ERROR `let` expressions in this position are experimental [E0658]
|
||||
|
@ -15,6 +15,7 @@ LL | if (let 0 = 1) {}
|
||||
|
|
||||
= note: see issue #53667 <https://github.com/rust-lang/rust/issues/53667> for more information
|
||||
= help: add `#![feature(let_chains)]` to the crate attributes to enable
|
||||
= help: you can write `matches!(<expr>, <pattern>)` instead of `let <pattern> = <expr>`
|
||||
|
||||
error[E0658]: `let` expressions in this position are experimental
|
||||
--> $DIR/feature-gate.rs:18:11
|
||||
@ -24,6 +25,7 @@ LL | if (((let 0 = 1))) {}
|
||||
|
|
||||
= note: see issue #53667 <https://github.com/rust-lang/rust/issues/53667> for more information
|
||||
= help: add `#![feature(let_chains)]` to the crate attributes to enable
|
||||
= help: you can write `matches!(<expr>, <pattern>)` instead of `let <pattern> = <expr>`
|
||||
|
||||
error[E0658]: `let` expressions in this position are experimental
|
||||
--> $DIR/feature-gate.rs:22:16
|
||||
@ -33,6 +35,7 @@ LL | if true && let 0 = 1 {}
|
||||
|
|
||||
= note: see issue #53667 <https://github.com/rust-lang/rust/issues/53667> for more information
|
||||
= help: add `#![feature(let_chains)]` to the crate attributes to enable
|
||||
= help: you can write `matches!(<expr>, <pattern>)` instead of `let <pattern> = <expr>`
|
||||
|
||||
error[E0658]: `let` expressions in this position are experimental
|
||||
--> $DIR/feature-gate.rs:26:8
|
||||
@ -42,6 +45,7 @@ LL | if let 0 = 1 && true {}
|
||||
|
|
||||
= note: see issue #53667 <https://github.com/rust-lang/rust/issues/53667> for more information
|
||||
= help: add `#![feature(let_chains)]` to the crate attributes to enable
|
||||
= help: you can write `matches!(<expr>, <pattern>)` instead of `let <pattern> = <expr>`
|
||||
|
||||
error[E0658]: `let` expressions in this position are experimental
|
||||
--> $DIR/feature-gate.rs:30:9
|
||||
@ -51,6 +55,7 @@ LL | if (let 0 = 1) && true {}
|
||||
|
|
||||
= note: see issue #53667 <https://github.com/rust-lang/rust/issues/53667> for more information
|
||||
= help: add `#![feature(let_chains)]` to the crate attributes to enable
|
||||
= help: you can write `matches!(<expr>, <pattern>)` instead of `let <pattern> = <expr>`
|
||||
|
||||
error[E0658]: `let` expressions in this position are experimental
|
||||
--> $DIR/feature-gate.rs:34:17
|
||||
@ -60,6 +65,7 @@ LL | if true && (let 0 = 1) {}
|
||||
|
|
||||
= note: see issue #53667 <https://github.com/rust-lang/rust/issues/53667> for more information
|
||||
= help: add `#![feature(let_chains)]` to the crate attributes to enable
|
||||
= help: you can write `matches!(<expr>, <pattern>)` instead of `let <pattern> = <expr>`
|
||||
|
||||
error[E0658]: `let` expressions in this position are experimental
|
||||
--> $DIR/feature-gate.rs:38:9
|
||||
@ -69,6 +75,7 @@ LL | if (let 0 = 1) && (let 0 = 1) {}
|
||||
|
|
||||
= note: see issue #53667 <https://github.com/rust-lang/rust/issues/53667> for more information
|
||||
= help: add `#![feature(let_chains)]` to the crate attributes to enable
|
||||
= help: you can write `matches!(<expr>, <pattern>)` instead of `let <pattern> = <expr>`
|
||||
|
||||
error[E0658]: `let` expressions in this position are experimental
|
||||
--> $DIR/feature-gate.rs:38:24
|
||||
@ -78,6 +85,7 @@ LL | if (let 0 = 1) && (let 0 = 1) {}
|
||||
|
|
||||
= note: see issue #53667 <https://github.com/rust-lang/rust/issues/53667> for more information
|
||||
= help: add `#![feature(let_chains)]` to the crate attributes to enable
|
||||
= help: you can write `matches!(<expr>, <pattern>)` instead of `let <pattern> = <expr>`
|
||||
|
||||
error[E0658]: `let` expressions in this position are experimental
|
||||
--> $DIR/feature-gate.rs:44:8
|
||||
@ -87,6 +95,7 @@ LL | if let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 = 5) {}
|
||||
|
|
||||
= note: see issue #53667 <https://github.com/rust-lang/rust/issues/53667> for more information
|
||||
= help: add `#![feature(let_chains)]` to the crate attributes to enable
|
||||
= help: you can write `matches!(<expr>, <pattern>)` instead of `let <pattern> = <expr>`
|
||||
|
||||
error[E0658]: `let` expressions in this position are experimental
|
||||
--> $DIR/feature-gate.rs:44:21
|
||||
@ -96,6 +105,7 @@ LL | if let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 = 5) {}
|
||||
|
|
||||
= note: see issue #53667 <https://github.com/rust-lang/rust/issues/53667> for more information
|
||||
= help: add `#![feature(let_chains)]` to the crate attributes to enable
|
||||
= help: you can write `matches!(<expr>, <pattern>)` instead of `let <pattern> = <expr>`
|
||||
|
||||
error[E0658]: `let` expressions in this position are experimental
|
||||
--> $DIR/feature-gate.rs:44:35
|
||||
@ -105,6 +115,7 @@ LL | if let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 = 5) {}
|
||||
|
|
||||
= note: see issue #53667 <https://github.com/rust-lang/rust/issues/53667> for more information
|
||||
= help: add `#![feature(let_chains)]` to the crate attributes to enable
|
||||
= help: you can write `matches!(<expr>, <pattern>)` instead of `let <pattern> = <expr>`
|
||||
|
||||
error[E0658]: `let` expressions in this position are experimental
|
||||
--> $DIR/feature-gate.rs:44:48
|
||||
@ -114,6 +125,7 @@ LL | if let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 = 5) {}
|
||||
|
|
||||
= note: see issue #53667 <https://github.com/rust-lang/rust/issues/53667> for more information
|
||||
= help: add `#![feature(let_chains)]` to the crate attributes to enable
|
||||
= help: you can write `matches!(<expr>, <pattern>)` instead of `let <pattern> = <expr>`
|
||||
|
||||
error[E0658]: `let` expressions in this position are experimental
|
||||
--> $DIR/feature-gate.rs:44:61
|
||||
@ -123,6 +135,7 @@ LL | if let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 = 5) {}
|
||||
|
|
||||
= note: see issue #53667 <https://github.com/rust-lang/rust/issues/53667> for more information
|
||||
= help: add `#![feature(let_chains)]` to the crate attributes to enable
|
||||
= help: you can write `matches!(<expr>, <pattern>)` instead of `let <pattern> = <expr>`
|
||||
|
||||
error[E0658]: `let` expressions in this position are experimental
|
||||
--> $DIR/feature-gate.rs:56:8
|
||||
@ -132,6 +145,7 @@ LL | if let Range { start: _, end: _ } = (true..true) && false {}
|
||||
|
|
||||
= note: see issue #53667 <https://github.com/rust-lang/rust/issues/53667> for more information
|
||||
= help: add `#![feature(let_chains)]` to the crate attributes to enable
|
||||
= help: you can write `matches!(<expr>, <pattern>)` instead of `let <pattern> = <expr>`
|
||||
|
||||
error[E0658]: `let` expressions in this position are experimental
|
||||
--> $DIR/feature-gate.rs:64:12
|
||||
@ -141,6 +155,7 @@ LL | while (let 0 = 1) {}
|
||||
|
|
||||
= note: see issue #53667 <https://github.com/rust-lang/rust/issues/53667> for more information
|
||||
= help: add `#![feature(let_chains)]` to the crate attributes to enable
|
||||
= help: you can write `matches!(<expr>, <pattern>)` instead of `let <pattern> = <expr>`
|
||||
|
||||
error[E0658]: `let` expressions in this position are experimental
|
||||
--> $DIR/feature-gate.rs:68:14
|
||||
@ -150,6 +165,7 @@ LL | while (((let 0 = 1))) {}
|
||||
|
|
||||
= note: see issue #53667 <https://github.com/rust-lang/rust/issues/53667> for more information
|
||||
= help: add `#![feature(let_chains)]` to the crate attributes to enable
|
||||
= help: you can write `matches!(<expr>, <pattern>)` instead of `let <pattern> = <expr>`
|
||||
|
||||
error[E0658]: `let` expressions in this position are experimental
|
||||
--> $DIR/feature-gate.rs:72:19
|
||||
@ -159,6 +175,7 @@ LL | while true && let 0 = 1 {}
|
||||
|
|
||||
= note: see issue #53667 <https://github.com/rust-lang/rust/issues/53667> for more information
|
||||
= help: add `#![feature(let_chains)]` to the crate attributes to enable
|
||||
= help: you can write `matches!(<expr>, <pattern>)` instead of `let <pattern> = <expr>`
|
||||
|
||||
error[E0658]: `let` expressions in this position are experimental
|
||||
--> $DIR/feature-gate.rs:76:11
|
||||
@ -168,6 +185,7 @@ LL | while let 0 = 1 && true {}
|
||||
|
|
||||
= note: see issue #53667 <https://github.com/rust-lang/rust/issues/53667> for more information
|
||||
= help: add `#![feature(let_chains)]` to the crate attributes to enable
|
||||
= help: you can write `matches!(<expr>, <pattern>)` instead of `let <pattern> = <expr>`
|
||||
|
||||
error[E0658]: `let` expressions in this position are experimental
|
||||
--> $DIR/feature-gate.rs:80:12
|
||||
@ -177,6 +195,7 @@ LL | while (let 0 = 1) && true {}
|
||||
|
|
||||
= note: see issue #53667 <https://github.com/rust-lang/rust/issues/53667> for more information
|
||||
= help: add `#![feature(let_chains)]` to the crate attributes to enable
|
||||
= help: you can write `matches!(<expr>, <pattern>)` instead of `let <pattern> = <expr>`
|
||||
|
||||
error[E0658]: `let` expressions in this position are experimental
|
||||
--> $DIR/feature-gate.rs:84:20
|
||||
@ -186,6 +205,7 @@ LL | while true && (let 0 = 1) {}
|
||||
|
|
||||
= note: see issue #53667 <https://github.com/rust-lang/rust/issues/53667> for more information
|
||||
= help: add `#![feature(let_chains)]` to the crate attributes to enable
|
||||
= help: you can write `matches!(<expr>, <pattern>)` instead of `let <pattern> = <expr>`
|
||||
|
||||
error[E0658]: `let` expressions in this position are experimental
|
||||
--> $DIR/feature-gate.rs:88:12
|
||||
@ -195,6 +215,7 @@ LL | while (let 0 = 1) && (let 0 = 1) {}
|
||||
|
|
||||
= note: see issue #53667 <https://github.com/rust-lang/rust/issues/53667> for more information
|
||||
= help: add `#![feature(let_chains)]` to the crate attributes to enable
|
||||
= help: you can write `matches!(<expr>, <pattern>)` instead of `let <pattern> = <expr>`
|
||||
|
||||
error[E0658]: `let` expressions in this position are experimental
|
||||
--> $DIR/feature-gate.rs:88:27
|
||||
@ -204,6 +225,7 @@ LL | while (let 0 = 1) && (let 0 = 1) {}
|
||||
|
|
||||
= note: see issue #53667 <https://github.com/rust-lang/rust/issues/53667> for more information
|
||||
= help: add `#![feature(let_chains)]` to the crate attributes to enable
|
||||
= help: you can write `matches!(<expr>, <pattern>)` instead of `let <pattern> = <expr>`
|
||||
|
||||
error[E0658]: `let` expressions in this position are experimental
|
||||
--> $DIR/feature-gate.rs:94:11
|
||||
@ -213,6 +235,7 @@ LL | while let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 = 5) {
|
||||
|
|
||||
= note: see issue #53667 <https://github.com/rust-lang/rust/issues/53667> for more information
|
||||
= help: add `#![feature(let_chains)]` to the crate attributes to enable
|
||||
= help: you can write `matches!(<expr>, <pattern>)` instead of `let <pattern> = <expr>`
|
||||
|
||||
error[E0658]: `let` expressions in this position are experimental
|
||||
--> $DIR/feature-gate.rs:94:24
|
||||
@ -222,6 +245,7 @@ LL | while let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 = 5) {
|
||||
|
|
||||
= note: see issue #53667 <https://github.com/rust-lang/rust/issues/53667> for more information
|
||||
= help: add `#![feature(let_chains)]` to the crate attributes to enable
|
||||
= help: you can write `matches!(<expr>, <pattern>)` instead of `let <pattern> = <expr>`
|
||||
|
||||
error[E0658]: `let` expressions in this position are experimental
|
||||
--> $DIR/feature-gate.rs:94:38
|
||||
@ -231,6 +255,7 @@ LL | while let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 = 5) {
|
||||
|
|
||||
= note: see issue #53667 <https://github.com/rust-lang/rust/issues/53667> for more information
|
||||
= help: add `#![feature(let_chains)]` to the crate attributes to enable
|
||||
= help: you can write `matches!(<expr>, <pattern>)` instead of `let <pattern> = <expr>`
|
||||
|
||||
error[E0658]: `let` expressions in this position are experimental
|
||||
--> $DIR/feature-gate.rs:94:51
|
||||
@ -240,6 +265,7 @@ LL | while let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 = 5) {
|
||||
|
|
||||
= note: see issue #53667 <https://github.com/rust-lang/rust/issues/53667> for more information
|
||||
= help: add `#![feature(let_chains)]` to the crate attributes to enable
|
||||
= help: you can write `matches!(<expr>, <pattern>)` instead of `let <pattern> = <expr>`
|
||||
|
||||
error[E0658]: `let` expressions in this position are experimental
|
||||
--> $DIR/feature-gate.rs:94:64
|
||||
@ -249,6 +275,7 @@ LL | while let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 = 5) {
|
||||
|
|
||||
= note: see issue #53667 <https://github.com/rust-lang/rust/issues/53667> for more information
|
||||
= help: add `#![feature(let_chains)]` to the crate attributes to enable
|
||||
= help: you can write `matches!(<expr>, <pattern>)` instead of `let <pattern> = <expr>`
|
||||
|
||||
error[E0658]: `let` expressions in this position are experimental
|
||||
--> $DIR/feature-gate.rs:106:11
|
||||
@ -258,6 +285,7 @@ LL | while let Range { start: _, end: _ } = (true..true) && false {}
|
||||
|
|
||||
= note: see issue #53667 <https://github.com/rust-lang/rust/issues/53667> for more information
|
||||
= help: add `#![feature(let_chains)]` to the crate attributes to enable
|
||||
= help: you can write `matches!(<expr>, <pattern>)` instead of `let <pattern> = <expr>`
|
||||
|
||||
error[E0658]: `let` expressions in this position are experimental
|
||||
--> $DIR/feature-gate.rs:131:20
|
||||
@ -267,6 +295,7 @@ LL | #[cfg(FALSE)] (let 0 = 1);
|
||||
|
|
||||
= note: see issue #53667 <https://github.com/rust-lang/rust/issues/53667> for more information
|
||||
= help: add `#![feature(let_chains)]` to the crate attributes to enable
|
||||
= help: you can write `matches!(<expr>, <pattern>)` instead of `let <pattern> = <expr>`
|
||||
|
||||
error[E0658]: `let` expressions in this position are experimental
|
||||
--> $DIR/feature-gate.rs:114:17
|
||||
@ -276,6 +305,7 @@ LL | noop_expr!((let 0 = 1));
|
||||
|
|
||||
= note: see issue #53667 <https://github.com/rust-lang/rust/issues/53667> for more information
|
||||
= help: add `#![feature(let_chains)]` to the crate attributes to enable
|
||||
= help: you can write `matches!(<expr>, <pattern>)` instead of `let <pattern> = <expr>`
|
||||
|
||||
error[E0658]: `let` expressions in this position are experimental
|
||||
--> $DIR/feature-gate.rs:123:16
|
||||
@ -285,6 +315,7 @@ LL | use_expr!((let 0 = 1 && 0 == 0));
|
||||
|
|
||||
= note: see issue #53667 <https://github.com/rust-lang/rust/issues/53667> for more information
|
||||
= help: add `#![feature(let_chains)]` to the crate attributes to enable
|
||||
= help: you can write `matches!(<expr>, <pattern>)` instead of `let <pattern> = <expr>`
|
||||
|
||||
error[E0658]: `let` expressions in this position are experimental
|
||||
--> $DIR/feature-gate.rs:127:16
|
||||
@ -294,24 +325,29 @@ LL | use_expr!((let 0 = 1));
|
||||
|
|
||||
= note: see issue #53667 <https://github.com/rust-lang/rust/issues/53667> for more information
|
||||
= help: add `#![feature(let_chains)]` to the crate attributes to enable
|
||||
= help: you can write `matches!(<expr>, <pattern>)` instead of `let <pattern> = <expr>`
|
||||
|
||||
error: `let` expressions are not supported here
|
||||
--> $DIR/feature-gate.rs:14:9
|
||||
error: invalid parentheses around `let` expression in `if let`
|
||||
--> $DIR/feature-gate.rs:14:8
|
||||
|
|
||||
LL | if (let 0 = 1) {}
|
||||
| ^^^^^^^^^
|
||||
| ^ ^
|
||||
|
|
||||
= note: only supported directly in conditions of `if`- and `while`-expressions
|
||||
= note: as well as when nested within `&&` and parenthesis in those conditions
|
||||
help: `if let` needs to be written without parentheses
|
||||
|
|
||||
LL | if let 0 = 1 {}
|
||||
| -- --
|
||||
|
||||
error: `let` expressions are not supported here
|
||||
--> $DIR/feature-gate.rs:18:11
|
||||
error: invalid parentheses around `let` expression in `if let`
|
||||
--> $DIR/feature-gate.rs:18:8
|
||||
|
|
||||
LL | if (((let 0 = 1))) {}
|
||||
| ^^^^^^^^^
|
||||
| ^^^ ^^^
|
||||
|
|
||||
= note: only supported directly in conditions of `if`- and `while`-expressions
|
||||
= note: as well as when nested within `&&` and parenthesis in those conditions
|
||||
help: `if let` needs to be written without parentheses
|
||||
|
|
||||
LL | if let 0 = 1 {}
|
||||
| -- --
|
||||
|
||||
error: `let` expressions are not supported here
|
||||
--> $DIR/feature-gate.rs:22:16
|
||||
@ -319,8 +355,7 @@ error: `let` expressions are not supported here
|
||||
LL | if true && let 0 = 1 {}
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: only supported directly in conditions of `if`- and `while`-expressions
|
||||
= note: as well as when nested within `&&` and parenthesis in those conditions
|
||||
= note: only supported directly without parentheses in conditions of `if`- and `while`-expressions, as well as in `let` chains within parentheses
|
||||
|
||||
error: `let` expressions are not supported here
|
||||
--> $DIR/feature-gate.rs:26:8
|
||||
@ -328,8 +363,7 @@ error: `let` expressions are not supported here
|
||||
LL | if let 0 = 1 && true {}
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: only supported directly in conditions of `if`- and `while`-expressions
|
||||
= note: as well as when nested within `&&` and parenthesis in those conditions
|
||||
= note: only supported directly without parentheses in conditions of `if`- and `while`-expressions, as well as in `let` chains within parentheses
|
||||
|
||||
error: `let` expressions are not supported here
|
||||
--> $DIR/feature-gate.rs:30:9
|
||||
@ -337,8 +371,7 @@ error: `let` expressions are not supported here
|
||||
LL | if (let 0 = 1) && true {}
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: only supported directly in conditions of `if`- and `while`-expressions
|
||||
= note: as well as when nested within `&&` and parenthesis in those conditions
|
||||
= note: only supported directly without parentheses in conditions of `if`- and `while`-expressions, as well as in `let` chains within parentheses
|
||||
|
||||
error: `let` expressions are not supported here
|
||||
--> $DIR/feature-gate.rs:34:17
|
||||
@ -346,8 +379,7 @@ error: `let` expressions are not supported here
|
||||
LL | if true && (let 0 = 1) {}
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: only supported directly in conditions of `if`- and `while`-expressions
|
||||
= note: as well as when nested within `&&` and parenthesis in those conditions
|
||||
= note: only supported directly without parentheses in conditions of `if`- and `while`-expressions, as well as in `let` chains within parentheses
|
||||
|
||||
error: `let` expressions are not supported here
|
||||
--> $DIR/feature-gate.rs:38:9
|
||||
@ -355,8 +387,7 @@ error: `let` expressions are not supported here
|
||||
LL | if (let 0 = 1) && (let 0 = 1) {}
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: only supported directly in conditions of `if`- and `while`-expressions
|
||||
= note: as well as when nested within `&&` and parenthesis in those conditions
|
||||
= note: only supported directly without parentheses in conditions of `if`- and `while`-expressions, as well as in `let` chains within parentheses
|
||||
|
||||
error: `let` expressions are not supported here
|
||||
--> $DIR/feature-gate.rs:38:24
|
||||
@ -364,8 +395,7 @@ error: `let` expressions are not supported here
|
||||
LL | if (let 0 = 1) && (let 0 = 1) {}
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: only supported directly in conditions of `if`- and `while`-expressions
|
||||
= note: as well as when nested within `&&` and parenthesis in those conditions
|
||||
= note: only supported directly without parentheses in conditions of `if`- and `while`-expressions, as well as in `let` chains within parentheses
|
||||
|
||||
error: `let` expressions are not supported here
|
||||
--> $DIR/feature-gate.rs:44:8
|
||||
@ -373,8 +403,7 @@ error: `let` expressions are not supported here
|
||||
LL | if let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 = 5) {}
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: only supported directly in conditions of `if`- and `while`-expressions
|
||||
= note: as well as when nested within `&&` and parenthesis in those conditions
|
||||
= note: only supported directly without parentheses in conditions of `if`- and `while`-expressions, as well as in `let` chains within parentheses
|
||||
|
||||
error: `let` expressions are not supported here
|
||||
--> $DIR/feature-gate.rs:44:21
|
||||
@ -382,8 +411,7 @@ error: `let` expressions are not supported here
|
||||
LL | if let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 = 5) {}
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: only supported directly in conditions of `if`- and `while`-expressions
|
||||
= note: as well as when nested within `&&` and parenthesis in those conditions
|
||||
= note: only supported directly without parentheses in conditions of `if`- and `while`-expressions, as well as in `let` chains within parentheses
|
||||
|
||||
error: `let` expressions are not supported here
|
||||
--> $DIR/feature-gate.rs:44:35
|
||||
@ -391,8 +419,7 @@ error: `let` expressions are not supported here
|
||||
LL | if let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 = 5) {}
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: only supported directly in conditions of `if`- and `while`-expressions
|
||||
= note: as well as when nested within `&&` and parenthesis in those conditions
|
||||
= note: only supported directly without parentheses in conditions of `if`- and `while`-expressions, as well as in `let` chains within parentheses
|
||||
|
||||
error: `let` expressions are not supported here
|
||||
--> $DIR/feature-gate.rs:44:48
|
||||
@ -400,8 +427,7 @@ error: `let` expressions are not supported here
|
||||
LL | if let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 = 5) {}
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: only supported directly in conditions of `if`- and `while`-expressions
|
||||
= note: as well as when nested within `&&` and parenthesis in those conditions
|
||||
= note: only supported directly without parentheses in conditions of `if`- and `while`-expressions, as well as in `let` chains within parentheses
|
||||
|
||||
error: `let` expressions are not supported here
|
||||
--> $DIR/feature-gate.rs:44:61
|
||||
@ -409,8 +435,7 @@ error: `let` expressions are not supported here
|
||||
LL | if let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 = 5) {}
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: only supported directly in conditions of `if`- and `while`-expressions
|
||||
= note: as well as when nested within `&&` and parenthesis in those conditions
|
||||
= note: only supported directly without parentheses in conditions of `if`- and `while`-expressions, as well as in `let` chains within parentheses
|
||||
|
||||
error: `let` expressions are not supported here
|
||||
--> $DIR/feature-gate.rs:56:8
|
||||
@ -418,8 +443,7 @@ error: `let` expressions are not supported here
|
||||
LL | if let Range { start: _, end: _ } = (true..true) && false {}
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: only supported directly in conditions of `if`- and `while`-expressions
|
||||
= note: as well as when nested within `&&` and parenthesis in those conditions
|
||||
= note: only supported directly without parentheses in conditions of `if`- and `while`-expressions, as well as in `let` chains within parentheses
|
||||
|
||||
error: `let` expressions are not supported here
|
||||
--> $DIR/feature-gate.rs:64:12
|
||||
@ -427,8 +451,7 @@ error: `let` expressions are not supported here
|
||||
LL | while (let 0 = 1) {}
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: only supported directly in conditions of `if`- and `while`-expressions
|
||||
= note: as well as when nested within `&&` and parenthesis in those conditions
|
||||
= note: only supported directly without parentheses in conditions of `if`- and `while`-expressions, as well as in `let` chains within parentheses
|
||||
|
||||
error: `let` expressions are not supported here
|
||||
--> $DIR/feature-gate.rs:68:14
|
||||
@ -436,8 +459,7 @@ error: `let` expressions are not supported here
|
||||
LL | while (((let 0 = 1))) {}
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: only supported directly in conditions of `if`- and `while`-expressions
|
||||
= note: as well as when nested within `&&` and parenthesis in those conditions
|
||||
= note: only supported directly without parentheses in conditions of `if`- and `while`-expressions, as well as in `let` chains within parentheses
|
||||
|
||||
error: `let` expressions are not supported here
|
||||
--> $DIR/feature-gate.rs:72:19
|
||||
@ -445,8 +467,7 @@ error: `let` expressions are not supported here
|
||||
LL | while true && let 0 = 1 {}
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: only supported directly in conditions of `if`- and `while`-expressions
|
||||
= note: as well as when nested within `&&` and parenthesis in those conditions
|
||||
= note: only supported directly without parentheses in conditions of `if`- and `while`-expressions, as well as in `let` chains within parentheses
|
||||
|
||||
error: `let` expressions are not supported here
|
||||
--> $DIR/feature-gate.rs:76:11
|
||||
@ -454,8 +475,7 @@ error: `let` expressions are not supported here
|
||||
LL | while let 0 = 1 && true {}
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: only supported directly in conditions of `if`- and `while`-expressions
|
||||
= note: as well as when nested within `&&` and parenthesis in those conditions
|
||||
= note: only supported directly without parentheses in conditions of `if`- and `while`-expressions, as well as in `let` chains within parentheses
|
||||
|
||||
error: `let` expressions are not supported here
|
||||
--> $DIR/feature-gate.rs:80:12
|
||||
@ -463,8 +483,7 @@ error: `let` expressions are not supported here
|
||||
LL | while (let 0 = 1) && true {}
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: only supported directly in conditions of `if`- and `while`-expressions
|
||||
= note: as well as when nested within `&&` and parenthesis in those conditions
|
||||
= note: only supported directly without parentheses in conditions of `if`- and `while`-expressions, as well as in `let` chains within parentheses
|
||||
|
||||
error: `let` expressions are not supported here
|
||||
--> $DIR/feature-gate.rs:84:20
|
||||
@ -472,8 +491,7 @@ error: `let` expressions are not supported here
|
||||
LL | while true && (let 0 = 1) {}
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: only supported directly in conditions of `if`- and `while`-expressions
|
||||
= note: as well as when nested within `&&` and parenthesis in those conditions
|
||||
= note: only supported directly without parentheses in conditions of `if`- and `while`-expressions, as well as in `let` chains within parentheses
|
||||
|
||||
error: `let` expressions are not supported here
|
||||
--> $DIR/feature-gate.rs:88:12
|
||||
@ -481,8 +499,7 @@ error: `let` expressions are not supported here
|
||||
LL | while (let 0 = 1) && (let 0 = 1) {}
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: only supported directly in conditions of `if`- and `while`-expressions
|
||||
= note: as well as when nested within `&&` and parenthesis in those conditions
|
||||
= note: only supported directly without parentheses in conditions of `if`- and `while`-expressions, as well as in `let` chains within parentheses
|
||||
|
||||
error: `let` expressions are not supported here
|
||||
--> $DIR/feature-gate.rs:88:27
|
||||
@ -490,8 +507,7 @@ error: `let` expressions are not supported here
|
||||
LL | while (let 0 = 1) && (let 0 = 1) {}
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: only supported directly in conditions of `if`- and `while`-expressions
|
||||
= note: as well as when nested within `&&` and parenthesis in those conditions
|
||||
= note: only supported directly without parentheses in conditions of `if`- and `while`-expressions, as well as in `let` chains within parentheses
|
||||
|
||||
error: `let` expressions are not supported here
|
||||
--> $DIR/feature-gate.rs:94:11
|
||||
@ -499,8 +515,7 @@ error: `let` expressions are not supported here
|
||||
LL | while let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 = 5) {}
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: only supported directly in conditions of `if`- and `while`-expressions
|
||||
= note: as well as when nested within `&&` and parenthesis in those conditions
|
||||
= note: only supported directly without parentheses in conditions of `if`- and `while`-expressions, as well as in `let` chains within parentheses
|
||||
|
||||
error: `let` expressions are not supported here
|
||||
--> $DIR/feature-gate.rs:94:24
|
||||
@ -508,8 +523,7 @@ error: `let` expressions are not supported here
|
||||
LL | while let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 = 5) {}
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: only supported directly in conditions of `if`- and `while`-expressions
|
||||
= note: as well as when nested within `&&` and parenthesis in those conditions
|
||||
= note: only supported directly without parentheses in conditions of `if`- and `while`-expressions, as well as in `let` chains within parentheses
|
||||
|
||||
error: `let` expressions are not supported here
|
||||
--> $DIR/feature-gate.rs:94:38
|
||||
@ -517,8 +531,7 @@ error: `let` expressions are not supported here
|
||||
LL | while let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 = 5) {}
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: only supported directly in conditions of `if`- and `while`-expressions
|
||||
= note: as well as when nested within `&&` and parenthesis in those conditions
|
||||
= note: only supported directly without parentheses in conditions of `if`- and `while`-expressions, as well as in `let` chains within parentheses
|
||||
|
||||
error: `let` expressions are not supported here
|
||||
--> $DIR/feature-gate.rs:94:51
|
||||
@ -526,8 +539,7 @@ error: `let` expressions are not supported here
|
||||
LL | while let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 = 5) {}
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: only supported directly in conditions of `if`- and `while`-expressions
|
||||
= note: as well as when nested within `&&` and parenthesis in those conditions
|
||||
= note: only supported directly without parentheses in conditions of `if`- and `while`-expressions, as well as in `let` chains within parentheses
|
||||
|
||||
error: `let` expressions are not supported here
|
||||
--> $DIR/feature-gate.rs:94:64
|
||||
@ -535,8 +547,7 @@ error: `let` expressions are not supported here
|
||||
LL | while let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 = 5) {}
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: only supported directly in conditions of `if`- and `while`-expressions
|
||||
= note: as well as when nested within `&&` and parenthesis in those conditions
|
||||
= note: only supported directly without parentheses in conditions of `if`- and `while`-expressions, as well as in `let` chains within parentheses
|
||||
|
||||
error: `let` expressions are not supported here
|
||||
--> $DIR/feature-gate.rs:106:11
|
||||
@ -544,8 +555,7 @@ error: `let` expressions are not supported here
|
||||
LL | while let Range { start: _, end: _ } = (true..true) && false {}
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: only supported directly in conditions of `if`- and `while`-expressions
|
||||
= note: as well as when nested within `&&` and parenthesis in those conditions
|
||||
= note: only supported directly without parentheses in conditions of `if`- and `while`-expressions, as well as in `let` chains within parentheses
|
||||
|
||||
error: `let` expressions are not supported here
|
||||
--> $DIR/feature-gate.rs:123:16
|
||||
@ -553,8 +563,7 @@ error: `let` expressions are not supported here
|
||||
LL | use_expr!((let 0 = 1 && 0 == 0));
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: only supported directly in conditions of `if`- and `while`-expressions
|
||||
= note: as well as when nested within `&&` and parenthesis in those conditions
|
||||
= note: only supported directly without parentheses in conditions of `if`- and `while`-expressions, as well as in `let` chains within parentheses
|
||||
|
||||
error: `let` expressions are not supported here
|
||||
--> $DIR/feature-gate.rs:123:16
|
||||
@ -562,8 +571,18 @@ error: `let` expressions are not supported here
|
||||
LL | use_expr!((let 0 = 1 && 0 == 0));
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: only supported directly in conditions of `if`- and `while`-expressions
|
||||
= note: as well as when nested within `&&` and parenthesis in those conditions
|
||||
= note: only supported directly without parentheses in conditions of `if`- and `while`-expressions, as well as in `let` chains within parentheses
|
||||
|
||||
error: invalid parentheses around `let` expression in `if let`
|
||||
--> $DIR/feature-gate.rs:127:15
|
||||
|
|
||||
LL | use_expr!((let 0 = 1));
|
||||
| ^ ^
|
||||
|
|
||||
help: `if let` needs to be written without parentheses
|
||||
|
|
||||
LL | use_expr!(let 0 = 1);
|
||||
| -- --
|
||||
|
||||
error: `let` expressions are not supported here
|
||||
--> $DIR/feature-gate.rs:127:16
|
||||
@ -571,17 +590,7 @@ error: `let` expressions are not supported here
|
||||
LL | use_expr!((let 0 = 1));
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: only supported directly in conditions of `if`- and `while`-expressions
|
||||
= note: as well as when nested within `&&` and parenthesis in those conditions
|
||||
|
||||
error: `let` expressions are not supported here
|
||||
--> $DIR/feature-gate.rs:127:16
|
||||
|
|
||||
LL | use_expr!((let 0 = 1));
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: only supported directly in conditions of `if`- and `while`-expressions
|
||||
= note: as well as when nested within `&&` and parenthesis in those conditions
|
||||
= note: only supported directly without parentheses in conditions of `if`- and `while`-expressions, as well as in `let` chains within parentheses
|
||||
|
||||
error: aborting due to 65 previous errors
|
||||
|
||||
|
3
src/test/ui/rustdoc/README.md
Normal file
3
src/test/ui/rustdoc/README.md
Normal file
@ -0,0 +1,3 @@
|
||||
This directory is for tests that have to do with rustdoc, but test the behavior
|
||||
of rustc. For example, rustc should not warn that an attribute rustdoc uses is
|
||||
unknown.
|
@ -7,7 +7,7 @@
|
||||
|
||||
const ENTRY_LIMIT: usize = 1000;
|
||||
// FIXME: The following limits should be reduced eventually.
|
||||
const ROOT_ENTRY_LIMIT: usize = 1418;
|
||||
const ROOT_ENTRY_LIMIT: usize = 1408;
|
||||
const ISSUES_ENTRY_LIMIT: usize = 2565;
|
||||
|
||||
fn check_entries(path: &Path, bad: &mut bool) {
|
||||
|
Loading…
Reference in New Issue
Block a user