mirror of
https://github.com/allankoechke/rust.git
synced 2026-12-05 01:24:03 +00:00
Auto merge of #136070 - matthiaskrgr:rollup-b5enbuz, r=matthiaskrgr
Rollup of 7 pull requests Successful merges: - #134300 (remove long-deprecated no-op attributes no_start and crate_id) - #134373 (Improve and expand documentation of pipes) - #135934 (Include missing item in the 1.81 release notes) - #136005 (ports last few library files to new intrinsic style) - #136016 (Improve check-cfg expected names diagnostic) - #136039 (docs: fix typo in std::pin overview) - #136056 (Fix typo in const stability error message) r? `@ghost` `@rustbot` modify labels: rollup
This commit is contained in:
@@ -573,6 +573,7 @@ Libraries
|
||||
- [Replace sort implementations with stable `driftsort` and unstable `ipnsort`.](https://github.com/rust-lang/rust/pull/124032/) All `slice::sort*` and `slice::select_nth*` methods are expected to see significant performance improvements. See the [research project](https://github.com/Voultapher/sort-research-rs) for more details.
|
||||
- [Document behavior of `create_dir_all` with respect to empty paths.](https://github.com/rust-lang/rust/pull/125112/)
|
||||
- [Fix interleaved output in the default panic hook when multiple threads panic simultaneously.](https://github.com/rust-lang/rust/pull/127397/)
|
||||
- Fix `Command`'s batch files argument escaping not working when file name has trailing whitespace or periods (CVE-2024-43402).
|
||||
|
||||
<a id="1.81.0-Stabilized-APIs"></a>
|
||||
|
||||
|
||||
@@ -416,7 +416,7 @@ const_eval_unsized_local = unsized locals are not supported
|
||||
const_eval_unstable_const_fn = `{$def_path}` is not yet stable as a const fn
|
||||
const_eval_unstable_in_stable_exposed =
|
||||
const function that might be (indirectly) exposed to stable cannot use `#[feature({$gate})]`
|
||||
.is_function_call = mark the callee as `#[rustc_const_stable_indirect]` if it does not itself require any unsafe features
|
||||
.is_function_call = mark the callee as `#[rustc_const_stable_indirect]` if it does not itself require any unstable features
|
||||
.unstable_sugg = if the {$is_function_call2 ->
|
||||
[true] caller
|
||||
*[false] function
|
||||
|
||||
@@ -408,11 +408,6 @@ pub const BUILTIN_ATTRIBUTES: &[BuiltinAttribute] = &[
|
||||
crate_type, CrateLevel, template!(NameValueStr: "bin|lib|..."), DuplicatesOk,
|
||||
EncodeCrossCrate::No,
|
||||
),
|
||||
// crate_id is deprecated
|
||||
ungated!(
|
||||
crate_id, CrateLevel, template!(NameValueStr: "ignored"), FutureWarnFollowing,
|
||||
EncodeCrossCrate::No,
|
||||
),
|
||||
|
||||
// ABI, linking, symbols, and FFI
|
||||
ungated!(
|
||||
@@ -448,7 +443,6 @@ pub const BUILTIN_ATTRIBUTES: &[BuiltinAttribute] = &[
|
||||
),
|
||||
|
||||
// Entry point:
|
||||
ungated!(no_start, CrateLevel, template!(Word), WarnFollowing, EncodeCrossCrate::No),
|
||||
ungated!(no_main, CrateLevel, template!(Word), WarnFollowing, EncodeCrossCrate::No),
|
||||
|
||||
// Modules, prelude, and resolution:
|
||||
|
||||
@@ -69,12 +69,10 @@ lint_builtin_const_no_mangle = const items should never be `#[no_mangle]`
|
||||
|
||||
lint_builtin_decl_unsafe_fn = declaration of an `unsafe` function
|
||||
lint_builtin_decl_unsafe_method = declaration of an `unsafe` method
|
||||
lint_builtin_deprecated_attr_default_suggestion = remove this attribute
|
||||
|
||||
lint_builtin_deprecated_attr_link = use of deprecated attribute `{$name}`: {$reason}. See {$link}
|
||||
.msg_suggestion = {$msg}
|
||||
.default_suggestion = remove this attribute
|
||||
lint_builtin_deprecated_attr_used = use of deprecated attribute `{$name}`: no longer used
|
||||
lint_builtin_deref_nullptr = dereferencing a null pointer
|
||||
.label = this code causes undefined behavior when executed
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ use rustc_abi::BackendRepr;
|
||||
use rustc_ast::tokenstream::{TokenStream, TokenTree};
|
||||
use rustc_ast::visit::{FnCtxt, FnKind};
|
||||
use rustc_ast::{self as ast, *};
|
||||
use rustc_ast_pretty::pprust::{self, expr_to_string};
|
||||
use rustc_ast_pretty::pprust::expr_to_string;
|
||||
use rustc_errors::{Applicability, LintDiagnostic};
|
||||
use rustc_feature::{AttributeGate, BuiltinAttribute, GateIssue, Stability, deprecated_attributes};
|
||||
use rustc_hir as hir;
|
||||
@@ -49,7 +49,7 @@ use rustc_trait_selection::traits::{self};
|
||||
use crate::errors::BuiltinEllipsisInclusiveRangePatterns;
|
||||
use crate::lints::{
|
||||
BuiltinAnonymousParams, BuiltinConstNoMangle, BuiltinDeprecatedAttrLink,
|
||||
BuiltinDeprecatedAttrLinkSuggestion, BuiltinDeprecatedAttrUsed, BuiltinDerefNullptr,
|
||||
BuiltinDeprecatedAttrLinkSuggestion, BuiltinDerefNullptr,
|
||||
BuiltinEllipsisInclusiveRangePatternsLint, BuiltinExplicitOutlives,
|
||||
BuiltinExplicitOutlivesSuggestion, BuiltinFeatureIssueNote, BuiltinIncompleteFeatures,
|
||||
BuiltinIncompleteFeaturesHelp, BuiltinInternalFeatures, BuiltinKeywordIdents,
|
||||
@@ -848,12 +848,6 @@ impl EarlyLintPass for DeprecatedAttr {
|
||||
return;
|
||||
}
|
||||
}
|
||||
if attr.has_name(sym::no_start) || attr.has_name(sym::crate_id) {
|
||||
cx.emit_span_lint(DEPRECATED, attr.span, BuiltinDeprecatedAttrUsed {
|
||||
name: pprust::path_to_string(&attr.get_normal_item().path),
|
||||
suggestion: attr.span,
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -10,19 +10,35 @@ use crate::lints;
|
||||
|
||||
const MAX_CHECK_CFG_NAMES_OR_VALUES: usize = 35;
|
||||
|
||||
enum FilterWellKnownNames {
|
||||
Yes,
|
||||
No,
|
||||
}
|
||||
|
||||
fn sort_and_truncate_possibilities(
|
||||
sess: &Session,
|
||||
mut possibilities: Vec<Symbol>,
|
||||
filter_well_known_names: FilterWellKnownNames,
|
||||
) -> (Vec<Symbol>, usize) {
|
||||
let possibilities_len = possibilities.len();
|
||||
|
||||
let n_possibilities = if sess.opts.unstable_opts.check_cfg_all_expected {
|
||||
possibilities.len()
|
||||
} else {
|
||||
match filter_well_known_names {
|
||||
FilterWellKnownNames::Yes => {
|
||||
possibilities.retain(|cfg_name| {
|
||||
!sess.psess.check_config.well_known_names.contains(cfg_name)
|
||||
});
|
||||
}
|
||||
FilterWellKnownNames::No => {}
|
||||
};
|
||||
std::cmp::min(possibilities.len(), MAX_CHECK_CFG_NAMES_OR_VALUES)
|
||||
};
|
||||
|
||||
possibilities.sort_by(|s1, s2| s1.as_str().cmp(s2.as_str()));
|
||||
|
||||
let and_more = possibilities.len().saturating_sub(n_possibilities);
|
||||
let and_more = possibilities_len.saturating_sub(n_possibilities);
|
||||
possibilities.truncate(n_possibilities);
|
||||
(possibilities, and_more)
|
||||
}
|
||||
@@ -198,8 +214,10 @@ pub(super) fn unexpected_cfg_name(
|
||||
} else {
|
||||
vec![]
|
||||
};
|
||||
|
||||
let (possibilities, and_more) =
|
||||
sort_and_truncate_possibilities(sess, possibilities, FilterWellKnownNames::Yes);
|
||||
let expected_names = if !possibilities.is_empty() {
|
||||
let (possibilities, and_more) = sort_and_truncate_possibilities(sess, possibilities);
|
||||
let possibilities: Vec<_> =
|
||||
possibilities.into_iter().map(|s| Ident::new(s, name_span)).collect();
|
||||
Some(lints::unexpected_cfg_name::ExpectedNames {
|
||||
@@ -269,8 +287,11 @@ pub(super) fn unexpected_cfg_value(
|
||||
// for names as the possibilities could be very long
|
||||
let code_sugg = if !possibilities.is_empty() {
|
||||
let expected_values = {
|
||||
let (possibilities, and_more) =
|
||||
sort_and_truncate_possibilities(sess, possibilities.clone());
|
||||
let (possibilities, and_more) = sort_and_truncate_possibilities(
|
||||
sess,
|
||||
possibilities.clone(),
|
||||
FilterWellKnownNames::No,
|
||||
);
|
||||
lints::unexpected_cfg_value::ExpectedValues {
|
||||
name,
|
||||
have_none_possibility,
|
||||
|
||||
@@ -177,19 +177,6 @@ pub(crate) enum BuiltinDeprecatedAttrLinkSuggestion<'a> {
|
||||
},
|
||||
}
|
||||
|
||||
#[derive(LintDiagnostic)]
|
||||
#[diag(lint_builtin_deprecated_attr_used)]
|
||||
pub(crate) struct BuiltinDeprecatedAttrUsed {
|
||||
pub name: String,
|
||||
#[suggestion(
|
||||
lint_builtin_deprecated_attr_default_suggestion,
|
||||
style = "short",
|
||||
code = "",
|
||||
applicability = "machine-applicable"
|
||||
)]
|
||||
pub suggestion: Span,
|
||||
}
|
||||
|
||||
#[derive(LintDiagnostic)]
|
||||
#[diag(lint_builtin_unused_doc_comment)]
|
||||
pub(crate) struct BuiltinUnusedDocComment<'a> {
|
||||
|
||||
@@ -707,7 +707,6 @@ symbols! {
|
||||
coverage,
|
||||
coverage_attribute,
|
||||
cr,
|
||||
crate_id,
|
||||
crate_in_paths,
|
||||
crate_local,
|
||||
crate_name,
|
||||
@@ -1390,7 +1389,6 @@ symbols! {
|
||||
no_mangle,
|
||||
no_sanitize,
|
||||
no_stack_check,
|
||||
no_start,
|
||||
no_std,
|
||||
nomem,
|
||||
non_ascii_idents,
|
||||
|
||||
@@ -302,18 +302,28 @@ impl<'f> Drop for VaListImpl<'f> {
|
||||
}
|
||||
}
|
||||
|
||||
extern "rust-intrinsic" {
|
||||
/// Destroy the arglist `ap` after initialization with `va_start` or
|
||||
/// `va_copy`.
|
||||
#[rustc_nounwind]
|
||||
fn va_end(ap: &mut VaListImpl<'_>);
|
||||
|
||||
/// Copies the current location of arglist `src` to the arglist `dst`.
|
||||
#[rustc_nounwind]
|
||||
fn va_copy<'f>(dest: *mut VaListImpl<'f>, src: &VaListImpl<'f>);
|
||||
|
||||
/// Loads an argument of type `T` from the `va_list` `ap` and increment the
|
||||
/// argument `ap` points to.
|
||||
#[rustc_nounwind]
|
||||
fn va_arg<T: sealed_trait::VaArgSafe>(ap: &mut VaListImpl<'_>) -> T;
|
||||
/// Destroy the arglist `ap` after initialization with `va_start` or
|
||||
/// `va_copy`.
|
||||
#[rustc_intrinsic]
|
||||
#[rustc_intrinsic_must_be_overridden]
|
||||
#[rustc_nounwind]
|
||||
unsafe fn va_end(_ap: &mut VaListImpl<'_>) {
|
||||
unreachable!()
|
||||
}
|
||||
|
||||
/// Copies the current location of arglist `src` to the arglist `dst`.
|
||||
#[rustc_intrinsic]
|
||||
#[rustc_intrinsic_must_be_overridden]
|
||||
#[rustc_nounwind]
|
||||
unsafe fn va_copy<'f>(_dest: *mut VaListImpl<'f>, _src: &VaListImpl<'f>) {
|
||||
unreachable!()
|
||||
}
|
||||
|
||||
/// Loads an argument of type `T` from the `va_list` `ap` and increment the
|
||||
/// argument `ap` points to.
|
||||
#[rustc_intrinsic]
|
||||
#[rustc_intrinsic_must_be_overridden]
|
||||
#[rustc_nounwind]
|
||||
unsafe fn va_arg<T: sealed_trait::VaArgSafe>(_ap: &mut VaListImpl<'_>) -> T {
|
||||
unreachable!()
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -156,8 +156,8 @@
|
||||
//!
|
||||
//! In order to implement the second option, we must in some way enforce its key invariant,
|
||||
//! *i.e.* prevent the value from being *moved* or otherwise invalidated (you may notice this
|
||||
//! sounds an awful lot like the definition of *pinning* a value). There a few ways one might be
|
||||
//! able to enforce this invariant in Rust:
|
||||
//! sounds an awful lot like the definition of *pinning* a value). There are a few ways one might
|
||||
//! be able to enforce this invariant in Rust:
|
||||
//!
|
||||
//! 1. Offer a wholly `unsafe` API to interact with the object, thus requiring every caller to
|
||||
//! uphold the invariant themselves
|
||||
|
||||
@@ -3252,18 +3252,26 @@ impl<B: BufRead> Iterator for Lines<B> {
|
||||
}
|
||||
}
|
||||
|
||||
/// Create anonymous pipe that is close-on-exec and blocking.
|
||||
/// Create an anonymous pipe that is close-on-exec and blocking.
|
||||
///
|
||||
/// # Behavior
|
||||
///
|
||||
/// A pipe is a synchronous, unidirectional data channel between two or more processes, like an
|
||||
/// interprocess [`mpsc`](crate::sync::mpsc) provided by the OS. In particular:
|
||||
/// A pipe is a one-way data channel provided by the OS, which works across processes. A pipe is
|
||||
/// typically used to communicate between two or more separate processes, as there are better,
|
||||
/// faster ways to communicate within a single process.
|
||||
///
|
||||
/// In particular:
|
||||
///
|
||||
/// * A read on a [`PipeReader`] blocks until the pipe is non-empty.
|
||||
/// * A write on a [`PipeWriter`] blocks when the pipe is full.
|
||||
/// * When all copies of a [`PipeWriter`] are closed, a read on the corresponding [`PipeReader`]
|
||||
/// returns EOF.
|
||||
/// * [`PipeReader`] can be shared, but only one process will consume the data in the pipe.
|
||||
/// * [`PipeWriter`] can be shared, and multiple processes or threads can write to it at once, but
|
||||
/// writes (above a target-specific threshold) may have their data interleaved.
|
||||
/// * [`PipeReader`] can be shared, and multiple processes or threads can read it at once. Any
|
||||
/// given byte will only get consumed by one reader. There are no guarantees about data
|
||||
/// interleaving.
|
||||
/// * Portable applications cannot assume any atomicity of messages larger than a single byte.
|
||||
///
|
||||
/// # Capacity
|
||||
///
|
||||
@@ -3301,8 +3309,6 @@ impl<B: BufRead> Iterator for Lines<B> {
|
||||
/// # Ok(())
|
||||
/// # }
|
||||
/// ```
|
||||
/// [pipe]: https://man7.org/linux/man-pages/man2/pipe.2.html
|
||||
/// [CreatePipe]: https://learn.microsoft.com/en-us/windows/win32/api/namedpipeapi/nf-namedpipeapi-createpipe
|
||||
/// [man page]: https://man7.org/linux/man-pages/man7/pipe.7.html
|
||||
#[unstable(feature = "anonymous_pipe", issue = "127154")]
|
||||
#[inline]
|
||||
@@ -3310,12 +3316,12 @@ pub fn pipe() -> Result<(PipeReader, PipeWriter)> {
|
||||
pipe_inner().map(|(reader, writer)| (PipeReader(reader), PipeWriter(writer)))
|
||||
}
|
||||
|
||||
/// Read end of the anonymous pipe.
|
||||
/// Read end of an anonymous pipe.
|
||||
#[unstable(feature = "anonymous_pipe", issue = "127154")]
|
||||
#[derive(Debug)]
|
||||
pub struct PipeReader(pub(crate) AnonPipe);
|
||||
|
||||
/// Write end of the anonymous pipe.
|
||||
/// Write end of an anonymous pipe.
|
||||
#[unstable(feature = "anonymous_pipe", issue = "127154")]
|
||||
#[derive(Debug)]
|
||||
pub struct PipeWriter(pub(crate) AnonPipe);
|
||||
|
||||
@@ -13,6 +13,8 @@ the `unexpected_cfgs` lint and `--check-cfg` flag. It is not intended to provide
|
||||
individual details, for that refer to the [`--check-cfg` documentation](../check-cfg.md) and
|
||||
to the [Cargo book](../../cargo/index.html).
|
||||
|
||||
> The full list of well known cfgs (aka builtins) can be found under [Checking conditional configurations / Well known names and values](../check-cfg.md#well-known-names-and-values).
|
||||
|
||||
## Cargo feature
|
||||
|
||||
*See the [`[features]` section in the Cargo book][cargo-features] for more details.*
|
||||
|
||||
@@ -1,12 +1,24 @@
|
||||
// This test check that #[allow(unexpected_cfgs)] doesn't work if put on the same level
|
||||
// This test check that #[allow(unexpected_cfgs)] **doesn't work**
|
||||
// when put on the same level as the #[cfg] attribute.
|
||||
//
|
||||
// It should work, but due to interactions between how #[cfg]s are
|
||||
// expanded, the lint machinery and the check-cfg impl, we
|
||||
// miss the #[allow], althrough we probably shoudln't.
|
||||
//
|
||||
// cf. https://github.com/rust-lang/rust/issues/124735
|
||||
//
|
||||
//@ check-pass
|
||||
//@ no-auto-check-cfg
|
||||
//@ compile-flags: --check-cfg=cfg()
|
||||
//@ compile-flags: --check-cfg=cfg() --cfg=unknown_but_active_cfg
|
||||
|
||||
#[allow(unexpected_cfgs)]
|
||||
#[cfg(FALSE)]
|
||||
//~^ WARNING unexpected `cfg` condition name
|
||||
fn bar() {}
|
||||
|
||||
#[allow(unexpected_cfgs)]
|
||||
#[cfg(unknown_but_active_cfg)]
|
||||
//~^ WARNING unexpected `cfg` condition name
|
||||
fn bar() {}
|
||||
|
||||
fn main() {}
|
||||
|
||||
@@ -1,13 +1,21 @@
|
||||
warning: unexpected `cfg` condition name: `FALSE`
|
||||
--> $DIR/allow-same-level.rs:8:7
|
||||
--> $DIR/allow-same-level.rs:15:7
|
||||
|
|
||||
LL | #[cfg(FALSE)]
|
||||
| ^^^^^
|
||||
|
|
||||
= help: expected names are: `clippy`, `debug_assertions`, `doc`, `doctest`, `fmt_debug`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `rustfmt`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `ub_checks`, `unix`, and `windows`
|
||||
= help: to expect this configuration use `--check-cfg=cfg(FALSE)`
|
||||
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
|
||||
= note: `#[warn(unexpected_cfgs)]` on by default
|
||||
|
||||
warning: 1 warning emitted
|
||||
warning: unexpected `cfg` condition name: `unknown_but_active_cfg`
|
||||
--> $DIR/allow-same-level.rs:20:7
|
||||
|
|
||||
LL | #[cfg(unknown_but_active_cfg)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: to expect this configuration use `--check-cfg=cfg(unknown_but_active_cfg)`
|
||||
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
|
||||
|
||||
warning: 2 warnings emitted
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ warning: unexpected `cfg` condition name: `has_foo`
|
||||
LL | #[cfg(has_foo)]
|
||||
| ^^^^^^^
|
||||
|
|
||||
= help: expected names are: `clippy`, `debug_assertions`, `doc`, `doctest`, `fmt_debug`, `has_bar`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `rustfmt`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `ub_checks`, `unix`, and `windows`
|
||||
= help: expected names are: `has_bar` and 30 more
|
||||
= help: consider using a Cargo feature instead
|
||||
= help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint:
|
||||
[lints.rust]
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
warning: unexpected `cfg` condition value: `serde`
|
||||
--> $DIR/cargo-feature.rs:14:7
|
||||
--> $DIR/cargo-feature.rs:15:7
|
||||
|
|
||||
LL | #[cfg(feature = "serde")]
|
||||
| ^^^^^^^^^^^^^^^^^ help: remove the condition
|
||||
@@ -10,7 +10,7 @@ LL | #[cfg(feature = "serde")]
|
||||
= note: `#[warn(unexpected_cfgs)]` on by default
|
||||
|
||||
warning: unexpected `cfg` condition value: (none)
|
||||
--> $DIR/cargo-feature.rs:18:7
|
||||
--> $DIR/cargo-feature.rs:19:7
|
||||
|
|
||||
LL | #[cfg(feature)]
|
||||
| ^^^^^^^ help: remove the condition
|
||||
@@ -20,12 +20,12 @@ LL | #[cfg(feature)]
|
||||
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration
|
||||
|
||||
warning: unexpected `cfg` condition name: `tokio_unstable`
|
||||
--> $DIR/cargo-feature.rs:22:7
|
||||
--> $DIR/cargo-feature.rs:23:7
|
||||
|
|
||||
LL | #[cfg(tokio_unstable)]
|
||||
| ^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: expected names are: `clippy`, `debug_assertions`, `doc`, `doctest`, `feature`, `fmt_debug`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `rustfmt`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `ub_checks`, `unix`, and `windows`
|
||||
= help: expected names are: `docsrs`, `feature`, and `test` and 30 more
|
||||
= help: consider using a Cargo feature instead
|
||||
= help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint:
|
||||
[lints.rust]
|
||||
@@ -34,7 +34,7 @@ LL | #[cfg(tokio_unstable)]
|
||||
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration
|
||||
|
||||
warning: unexpected `cfg` condition name: `CONFIG_NVME`
|
||||
--> $DIR/cargo-feature.rs:26:7
|
||||
--> $DIR/cargo-feature.rs:27:7
|
||||
|
|
||||
LL | #[cfg(CONFIG_NVME = "m")]
|
||||
| ^^^^^^^^^^^^^^^^^
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
//@ no-auto-check-cfg
|
||||
//@ revisions: some none
|
||||
//@ rustc-env:CARGO_CRATE_NAME=foo
|
||||
//@ compile-flags: --check-cfg=cfg(docsrs,test)
|
||||
//@ [none]compile-flags: --check-cfg=cfg(feature,values())
|
||||
//@ [some]compile-flags: --check-cfg=cfg(feature,values("bitcode"))
|
||||
//@ [some]compile-flags: --check-cfg=cfg(CONFIG_NVME,values("y"))
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
warning: unexpected `cfg` condition value: `serde`
|
||||
--> $DIR/cargo-feature.rs:14:7
|
||||
--> $DIR/cargo-feature.rs:15:7
|
||||
|
|
||||
LL | #[cfg(feature = "serde")]
|
||||
| ^^^^^^^^^^^^^^^^^
|
||||
@@ -10,7 +10,7 @@ LL | #[cfg(feature = "serde")]
|
||||
= note: `#[warn(unexpected_cfgs)]` on by default
|
||||
|
||||
warning: unexpected `cfg` condition value: (none)
|
||||
--> $DIR/cargo-feature.rs:18:7
|
||||
--> $DIR/cargo-feature.rs:19:7
|
||||
|
|
||||
LL | #[cfg(feature)]
|
||||
| ^^^^^^^- help: specify a config value: `= "bitcode"`
|
||||
@@ -20,12 +20,12 @@ LL | #[cfg(feature)]
|
||||
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration
|
||||
|
||||
warning: unexpected `cfg` condition name: `tokio_unstable`
|
||||
--> $DIR/cargo-feature.rs:22:7
|
||||
--> $DIR/cargo-feature.rs:23:7
|
||||
|
|
||||
LL | #[cfg(tokio_unstable)]
|
||||
| ^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: expected names are: `CONFIG_NVME`, `clippy`, `debug_assertions`, `doc`, `doctest`, `feature`, `fmt_debug`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `rustfmt`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `ub_checks`, `unix`, and `windows`
|
||||
= help: expected names are: `CONFIG_NVME`, `docsrs`, `feature`, and `test` and 30 more
|
||||
= help: consider using a Cargo feature instead
|
||||
= help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint:
|
||||
[lints.rust]
|
||||
@@ -34,7 +34,7 @@ LL | #[cfg(tokio_unstable)]
|
||||
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration
|
||||
|
||||
warning: unexpected `cfg` condition value: `m`
|
||||
--> $DIR/cargo-feature.rs:26:7
|
||||
--> $DIR/cargo-feature.rs:27:7
|
||||
|
|
||||
LL | #[cfg(CONFIG_NVME = "m")]
|
||||
| ^^^^^^^^^^^^^^---
|
||||
|
||||
@@ -4,7 +4,7 @@ warning: unexpected `cfg` condition name: `value`
|
||||
LL | #[cfg(value)]
|
||||
| ^^^^^
|
||||
|
|
||||
= help: expected names are: `bar`, `bee`, `clippy`, `cow`, `debug_assertions`, `doc`, `doctest`, `fmt_debug`, `foo`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `rustfmt`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `ub_checks`, `unix`, and `windows`
|
||||
= help: expected names are: `bar`, `bee`, `cow`, and `foo` and 30 more
|
||||
= help: to expect this configuration use `--check-cfg=cfg(value)`
|
||||
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
|
||||
= note: `#[warn(unexpected_cfgs)]` on by default
|
||||
|
||||
@@ -4,7 +4,7 @@ warning: unexpected `cfg` condition name: `my_value`
|
||||
LL | #[cfg(my_value)]
|
||||
| ^^^^^^^^
|
||||
|
|
||||
= help: expected names are: `bar`, `clippy`, `debug_assertions`, `doc`, `doctest`, `fmt_debug`, `foo`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `rustfmt`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `ub_checks`, `unix`, and `windows`
|
||||
= help: expected names are: `bar` and `foo` and 30 more
|
||||
= help: to expect this configuration use `--check-cfg=cfg(my_value)`
|
||||
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
|
||||
= note: `#[warn(unexpected_cfgs)]` on by default
|
||||
|
||||
@@ -4,7 +4,6 @@ warning: unexpected `cfg` condition name: `linux`
|
||||
LL | #[cfg(linux)]
|
||||
| ^^^^^ help: found config with similar value: `target_os = "linux"`
|
||||
|
|
||||
= help: expected names are: `clippy`, `debug_assertions`, `doc`, `doctest`, `fmt_debug`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `rustfmt`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `ub_checks`, `unix`, and `windows`
|
||||
= help: to expect this configuration use `--check-cfg=cfg(linux)`
|
||||
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
|
||||
= note: `#[warn(unexpected_cfgs)]` on by default
|
||||
|
||||
@@ -4,7 +4,6 @@ warning: unexpected `cfg` condition name: `target_architecture`
|
||||
LL | #[cfg(target(os = "linux", architecture = "arm"))]
|
||||
| ^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: expected names are: `clippy`, `debug_assertions`, `doc`, `doctest`, `fmt_debug`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `rustfmt`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `ub_checks`, `unix`, and `windows`
|
||||
= help: to expect this configuration use `--check-cfg=cfg(target_architecture, values("arm"))`
|
||||
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
|
||||
= note: `#[warn(unexpected_cfgs)]` on by default
|
||||
|
||||
@@ -4,7 +4,6 @@ warning: unexpected `cfg` condition name: `unknown_key`
|
||||
LL | #[cfg(unknown_key = "value")]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: expected names are: `clippy`, `debug_assertions`, `doc`, `doctest`, `fmt_debug`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `rustfmt`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `ub_checks`, `unix`, and `windows`
|
||||
= help: to expect this configuration use `--check-cfg=cfg(unknown_key, values("value"))`
|
||||
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
|
||||
= note: `#[warn(unexpected_cfgs)]` on by default
|
||||
|
||||
@@ -4,7 +4,7 @@ warning: unexpected `cfg` condition name: `unknown_key`
|
||||
LL | #[cfg(unknown_key = "value")]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: expected names are: `clippy`, `debug_assertions`, `doc`, `doctest`, `feature`, `fmt_debug`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `rustfmt`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `ub_checks`, `unix`, and `windows`
|
||||
= help: expected names are: `feature` and 30 more
|
||||
= help: to expect this configuration use `--check-cfg=cfg(unknown_key, values("value"))`
|
||||
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
|
||||
= note: `#[warn(unexpected_cfgs)]` on by default
|
||||
|
||||
@@ -4,7 +4,7 @@ warning: unexpected `cfg` condition name: `unknown_key`
|
||||
LL | #[cfg(unknown_key = "value")]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: expected names are: `clippy`, `debug_assertions`, `doc`, `doctest`, `feature`, `fmt_debug`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `rustfmt`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `ub_checks`, `unix`, and `windows`
|
||||
= help: expected names are: `feature` and 30 more
|
||||
= help: to expect this configuration use `--check-cfg=cfg(unknown_key, values("value"))`
|
||||
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
|
||||
= note: `#[warn(unexpected_cfgs)]` on by default
|
||||
|
||||
@@ -4,7 +4,6 @@ warning: unexpected `cfg` condition name: `unknown_key`
|
||||
LL | #[cfg(unknown_key = "value")]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: expected names are: `clippy`, `debug_assertions`, `doc`, `doctest`, `fmt_debug`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `rustfmt`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `ub_checks`, `unix`, and `windows`
|
||||
= help: to expect this configuration use `--check-cfg=cfg(unknown_key, values("value"))`
|
||||
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
|
||||
= note: `#[warn(unexpected_cfgs)]` on by default
|
||||
|
||||
@@ -44,7 +44,7 @@ warning: unexpected `cfg` condition name: `uu`
|
||||
LL | #[cfg_attr(uu, unix)]
|
||||
| ^^
|
||||
|
|
||||
= help: expected names are: `clippy`, `debug_assertions`, `doc`, `doctest`, `feature`, `fmt_debug`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `rustfmt`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `ub_checks`, `unix`, and `windows`
|
||||
= help: expected names are: `feature` and 30 more
|
||||
= help: to expect this configuration use `--check-cfg=cfg(uu)`
|
||||
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ warning: unexpected `cfg` condition name: `r#false`
|
||||
LL | #[cfg(r#false)]
|
||||
| ^^^^^^^
|
||||
|
|
||||
= help: expected names are: `async`, `clippy`, `debug_assertions`, `doc`, `doctest`, `edition2015`, `edition2021`, `fmt_debug`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `rustfmt`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `r#true`, `ub_checks`, `unix`, and `windows`
|
||||
= help: expected names are: `async`, `edition2015`, `edition2021`, and `r#true` and 30 more
|
||||
= help: to expect this configuration use `--check-cfg=cfg(r#false)`
|
||||
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ warning: unexpected `cfg` condition name: `r#false`
|
||||
LL | #[cfg(r#false)]
|
||||
| ^^^^^^^
|
||||
|
|
||||
= help: expected names are: `r#async`, `clippy`, `debug_assertions`, `doc`, `doctest`, `edition2015`, `edition2021`, `fmt_debug`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `rustfmt`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `r#true`, `ub_checks`, `unix`, and `windows`
|
||||
= help: expected names are: `r#async`, `edition2015`, `edition2021`, and `r#true` and 30 more
|
||||
= help: to expect this configuration use `--check-cfg=cfg(r#false)`
|
||||
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ warning: unexpected `cfg` condition name: `my_lib_cfg`
|
||||
LL | cfg_macro::my_lib_macro!();
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: expected names are: `clippy`, `debug_assertions`, `doc`, `doctest`, `feature`, `fmt_debug`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `rustfmt`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `ub_checks`, `unix`, and `windows`
|
||||
= help: expected names are: `feature` and 30 more
|
||||
= note: using a cfg inside a macro will use the cfgs from the destination crate and not the ones from the defining crate
|
||||
= help: try referring to `cfg_macro::my_lib_macro` crate for guidance on how handle this unexpected cfg
|
||||
= help: the macro `cfg_macro::my_lib_macro` may come from an old version of the `cfg_macro` crate, try updating your dependency with `cargo update -p cfg_macro`
|
||||
|
||||
@@ -4,7 +4,7 @@ warning: unexpected `cfg` condition name: `my_lib_cfg`
|
||||
LL | cfg_macro::my_lib_macro!();
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: expected names are: `clippy`, `debug_assertions`, `doc`, `doctest`, `feature`, `fmt_debug`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `rustfmt`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `ub_checks`, `unix`, and `windows`
|
||||
= help: expected names are: `feature` and 30 more
|
||||
= note: using a cfg inside a macro will use the cfgs from the destination crate and not the ones from the defining crate
|
||||
= help: try referring to `cfg_macro::my_lib_macro` crate for guidance on how handle this unexpected cfg
|
||||
= help: to expect this configuration use `--check-cfg=cfg(my_lib_cfg)`
|
||||
|
||||
@@ -4,7 +4,6 @@ warning: unexpected `cfg` condition name: `crossbeam_loom`
|
||||
LL | #[cfg(crossbeam_loom)]
|
||||
| ^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: expected names are: `clippy`, `debug_assertions`, `doc`, `doctest`, `fmt_debug`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `rustfmt`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `ub_checks`, `unix`, and `windows`
|
||||
= help: to expect this configuration use `--check-cfg=cfg(crossbeam_loom)`
|
||||
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
|
||||
= note: `#[warn(unexpected_cfgs)]` on by default
|
||||
|
||||
@@ -14,7 +14,6 @@ warning: unexpected `cfg` condition name: `test`
|
||||
LL | #[cfg(test)]
|
||||
| ^^^^
|
||||
|
|
||||
= help: expected names are: `clippy`, `debug_assertions`, `doc`, `doctest`, `fmt_debug`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `rustfmt`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `ub_checks`, `unix`, and `windows`
|
||||
= help: to expect this configuration use `--check-cfg=cfg(test)`
|
||||
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
|
||||
|
||||
|
||||
@@ -2,7 +2,12 @@
|
||||
//
|
||||
//@ check-pass
|
||||
//@ no-auto-check-cfg
|
||||
//@ compile-flags: --check-cfg=cfg()
|
||||
//@ compile-flags: --check-cfg=cfg() -Zcheck-cfg-all-expected
|
||||
//@ normalize-stderr: "`, `" -> "`\n`"
|
||||
|
||||
#[cfg(list_all_well_known_cfgs)]
|
||||
//~^ WARNING unexpected `cfg` condition name
|
||||
fn in_diagnostics() {}
|
||||
|
||||
#[cfg(target_oz = "linux")]
|
||||
//~^ WARNING unexpected `cfg` condition name
|
||||
|
||||
@@ -1,29 +1,66 @@
|
||||
warning: unexpected `cfg` condition name: `list_all_well_known_cfgs`
|
||||
--> $DIR/well-known-names.rs:8:7
|
||||
|
|
||||
LL | #[cfg(list_all_well_known_cfgs)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: expected names are: `clippy`
|
||||
`debug_assertions`
|
||||
`doc`
|
||||
`doctest`
|
||||
`fmt_debug`
|
||||
`miri`
|
||||
`overflow_checks`
|
||||
`panic`
|
||||
`proc_macro`
|
||||
`relocation_model`
|
||||
`rustfmt`
|
||||
`sanitize`
|
||||
`sanitizer_cfi_generalize_pointers`
|
||||
`sanitizer_cfi_normalize_integers`
|
||||
`target_abi`
|
||||
`target_arch`
|
||||
`target_endian`
|
||||
`target_env`
|
||||
`target_family`
|
||||
`target_feature`
|
||||
`target_has_atomic`
|
||||
`target_has_atomic_equal_alignment`
|
||||
`target_has_atomic_load_store`
|
||||
`target_os`
|
||||
`target_pointer_width`
|
||||
`target_thread_local`
|
||||
`target_vendor`
|
||||
`ub_checks`
|
||||
`unix`, and `windows`
|
||||
= help: to expect this configuration use `--check-cfg=cfg(list_all_well_known_cfgs)`
|
||||
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
|
||||
= note: `#[warn(unexpected_cfgs)]` on by default
|
||||
|
||||
warning: unexpected `cfg` condition name: `target_oz`
|
||||
--> $DIR/well-known-names.rs:7:7
|
||||
--> $DIR/well-known-names.rs:12:7
|
||||
|
|
||||
LL | #[cfg(target_oz = "linux")]
|
||||
| ^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: to expect this configuration use `--check-cfg=cfg(target_oz, values("linux"))`
|
||||
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
|
||||
= note: `#[warn(unexpected_cfgs)]` on by default
|
||||
help: there is a config with a similar name and value
|
||||
|
|
||||
LL | #[cfg(target_os = "linux")]
|
||||
| ~~~~~~~~~
|
||||
|
||||
warning: unexpected `cfg` condition name: `features`
|
||||
--> $DIR/well-known-names.rs:14:7
|
||||
--> $DIR/well-known-names.rs:19:7
|
||||
|
|
||||
LL | #[cfg(features = "foo")]
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: expected names are: `clippy`, `debug_assertions`, `doc`, `doctest`, `fmt_debug`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `rustfmt`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `ub_checks`, `unix`, and `windows`
|
||||
= help: to expect this configuration use `--check-cfg=cfg(features, values("foo"))`
|
||||
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
|
||||
|
||||
warning: unexpected `cfg` condition name: `feature`
|
||||
--> $DIR/well-known-names.rs:18:7
|
||||
--> $DIR/well-known-names.rs:23:7
|
||||
|
|
||||
LL | #[cfg(feature = "foo")]
|
||||
| ^^^^^^^^^^^^^^^
|
||||
@@ -32,7 +69,7 @@ LL | #[cfg(feature = "foo")]
|
||||
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
|
||||
|
||||
warning: unexpected `cfg` condition name: `uniw`
|
||||
--> $DIR/well-known-names.rs:22:7
|
||||
--> $DIR/well-known-names.rs:27:7
|
||||
|
|
||||
LL | #[cfg(uniw)]
|
||||
| ^^^^ help: there is a config with a similar name: `unix`
|
||||
@@ -40,5 +77,5 @@ LL | #[cfg(uniw)]
|
||||
= help: to expect this configuration use `--check-cfg=cfg(uniw)`
|
||||
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
|
||||
|
||||
warning: 4 warnings emitted
|
||||
warning: 5 warnings emitted
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ error: const function that might be (indirectly) exposed to stable cannot use `#
|
||||
LL | const fn bar() -> u32 { foo() }
|
||||
| ^^^^^
|
||||
|
|
||||
= help: mark the callee as `#[rustc_const_stable_indirect]` if it does not itself require any unsafe features
|
||||
= help: mark the callee as `#[rustc_const_stable_indirect]` if it does not itself require any unstable features
|
||||
help: if the caller is not (yet) meant to be exposed to stable, add `#[rustc_const_unstable]` (this is what you probably want to do)
|
||||
|
|
||||
LL + #[rustc_const_unstable(feature = "...", issue = "...")]
|
||||
|
||||
@@ -4,7 +4,7 @@ error: const function that might be (indirectly) exposed to stable cannot use `#
|
||||
LL | const fn bar() -> u32 { foo() }
|
||||
| ^^^^^
|
||||
|
|
||||
= help: mark the callee as `#[rustc_const_stable_indirect]` if it does not itself require any unsafe features
|
||||
= help: mark the callee as `#[rustc_const_stable_indirect]` if it does not itself require any unstable features
|
||||
help: if the caller is not (yet) meant to be exposed to stable, add `#[rustc_const_unstable]` (this is what you probably want to do)
|
||||
|
|
||||
LL + #[rustc_const_unstable(feature = "...", issue = "...")]
|
||||
@@ -22,7 +22,7 @@ error: const function that might be (indirectly) exposed to stable cannot use `#
|
||||
LL | const fn bar2() -> u32 { foo2() }
|
||||
| ^^^^^^
|
||||
|
|
||||
= help: mark the callee as `#[rustc_const_stable_indirect]` if it does not itself require any unsafe features
|
||||
= help: mark the callee as `#[rustc_const_stable_indirect]` if it does not itself require any unstable features
|
||||
help: if the caller is not (yet) meant to be exposed to stable, add `#[rustc_const_unstable]` (this is what you probably want to do)
|
||||
|
|
||||
LL + #[rustc_const_unstable(feature = "...", issue = "...")]
|
||||
@@ -57,7 +57,7 @@ error: const function that might be (indirectly) exposed to stable cannot use `#
|
||||
LL | foo()
|
||||
| ^^^^^
|
||||
|
|
||||
= help: mark the callee as `#[rustc_const_stable_indirect]` if it does not itself require any unsafe features
|
||||
= help: mark the callee as `#[rustc_const_stable_indirect]` if it does not itself require any unstable features
|
||||
help: if the caller is not (yet) meant to be exposed to stable, add `#[rustc_const_unstable]` (this is what you probably want to do)
|
||||
|
|
||||
LL + #[rustc_const_unstable(feature = "...", issue = "...")]
|
||||
@@ -75,7 +75,7 @@ error: const function that might be (indirectly) exposed to stable cannot use `#
|
||||
LL | const fn bar2_gated() -> u32 { foo2_gated() }
|
||||
| ^^^^^^^^^^^^
|
||||
|
|
||||
= help: mark the callee as `#[rustc_const_stable_indirect]` if it does not itself require any unsafe features
|
||||
= help: mark the callee as `#[rustc_const_stable_indirect]` if it does not itself require any unstable features
|
||||
help: if the caller is not (yet) meant to be exposed to stable, add `#[rustc_const_unstable]` (this is what you probably want to do)
|
||||
|
|
||||
LL + #[rustc_const_unstable(feature = "...", issue = "...")]
|
||||
@@ -93,7 +93,7 @@ error: const function that might be (indirectly) exposed to stable cannot use `#
|
||||
LL | pub(crate) const fn bar2_gated_stable_indirect() -> u32 { super::foo2_gated() }
|
||||
| ^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: mark the callee as `#[rustc_const_stable_indirect]` if it does not itself require any unsafe features
|
||||
= help: mark the callee as `#[rustc_const_stable_indirect]` if it does not itself require any unstable features
|
||||
help: if the caller is not (yet) meant to be exposed to stable, add `#[rustc_const_unstable]` (this is what you probably want to do)
|
||||
|
|
||||
LL + #[rustc_const_unstable(feature = "...", issue = "...")]
|
||||
@@ -111,7 +111,7 @@ error: const function that might be (indirectly) exposed to stable cannot use `#
|
||||
LL | const fn stable_indirect() -> u32 { foo2_gated() }
|
||||
| ^^^^^^^^^^^^
|
||||
|
|
||||
= help: mark the callee as `#[rustc_const_stable_indirect]` if it does not itself require any unsafe features
|
||||
= help: mark the callee as `#[rustc_const_stable_indirect]` if it does not itself require any unstable features
|
||||
help: if the caller is not (yet) meant to be exposed to stable, add `#[rustc_const_unstable]` (this is what you probably want to do)
|
||||
|
|
||||
LL + #[rustc_const_unstable(feature = "...", issue = "...")]
|
||||
|
||||
@@ -4,7 +4,7 @@ error: const function that might be (indirectly) exposed to stable cannot use `#
|
||||
LL | const unsafe fn bar() -> u32 { unsafe { foo() } }
|
||||
| ^^^^^
|
||||
|
|
||||
= help: mark the callee as `#[rustc_const_stable_indirect]` if it does not itself require any unsafe features
|
||||
= help: mark the callee as `#[rustc_const_stable_indirect]` if it does not itself require any unstable features
|
||||
help: if the caller is not (yet) meant to be exposed to stable, add `#[rustc_const_unstable]` (this is what you probably want to do)
|
||||
|
|
||||
LL + #[rustc_const_unstable(feature = "...", issue = "...")]
|
||||
@@ -22,7 +22,7 @@ error: const function that might be (indirectly) exposed to stable cannot use `#
|
||||
LL | const unsafe fn bar2() -> u32 { unsafe { foo2() } }
|
||||
| ^^^^^^
|
||||
|
|
||||
= help: mark the callee as `#[rustc_const_stable_indirect]` if it does not itself require any unsafe features
|
||||
= help: mark the callee as `#[rustc_const_stable_indirect]` if it does not itself require any unstable features
|
||||
help: if the caller is not (yet) meant to be exposed to stable, add `#[rustc_const_unstable]` (this is what you probably want to do)
|
||||
|
|
||||
LL + #[rustc_const_unstable(feature = "...", issue = "...")]
|
||||
@@ -40,7 +40,7 @@ error: const function that might be (indirectly) exposed to stable cannot use `#
|
||||
LL | const unsafe fn bar2_gated() -> u32 { unsafe { foo2_gated() } }
|
||||
| ^^^^^^^^^^^^
|
||||
|
|
||||
= help: mark the callee as `#[rustc_const_stable_indirect]` if it does not itself require any unsafe features
|
||||
= help: mark the callee as `#[rustc_const_stable_indirect]` if it does not itself require any unstable features
|
||||
help: if the caller is not (yet) meant to be exposed to stable, add `#[rustc_const_unstable]` (this is what you probably want to do)
|
||||
|
|
||||
LL + #[rustc_const_unstable(feature = "...", issue = "...")]
|
||||
|
||||
@@ -4,7 +4,7 @@ error: const function that might be (indirectly) exposed to stable cannot use `#
|
||||
LL | const unsafe fn bar() -> u32 { foo() }
|
||||
| ^^^^^
|
||||
|
|
||||
= help: mark the callee as `#[rustc_const_stable_indirect]` if it does not itself require any unsafe features
|
||||
= help: mark the callee as `#[rustc_const_stable_indirect]` if it does not itself require any unstable features
|
||||
help: if the caller is not (yet) meant to be exposed to stable, add `#[rustc_const_unstable]` (this is what you probably want to do)
|
||||
|
|
||||
LL + #[rustc_const_unstable(feature = "...", issue = "...")]
|
||||
@@ -22,7 +22,7 @@ error: const function that might be (indirectly) exposed to stable cannot use `#
|
||||
LL | const unsafe fn bar2() -> u32 { foo2() }
|
||||
| ^^^^^^
|
||||
|
|
||||
= help: mark the callee as `#[rustc_const_stable_indirect]` if it does not itself require any unsafe features
|
||||
= help: mark the callee as `#[rustc_const_stable_indirect]` if it does not itself require any unstable features
|
||||
help: if the caller is not (yet) meant to be exposed to stable, add `#[rustc_const_unstable]` (this is what you probably want to do)
|
||||
|
|
||||
LL + #[rustc_const_unstable(feature = "...", issue = "...")]
|
||||
@@ -40,7 +40,7 @@ error: const function that might be (indirectly) exposed to stable cannot use `#
|
||||
LL | const unsafe fn bar2_gated() -> u32 { foo2_gated() }
|
||||
| ^^^^^^^^^^^^
|
||||
|
|
||||
= help: mark the callee as `#[rustc_const_stable_indirect]` if it does not itself require any unsafe features
|
||||
= help: mark the callee as `#[rustc_const_stable_indirect]` if it does not itself require any unstable features
|
||||
help: if the caller is not (yet) meant to be exposed to stable, add `#[rustc_const_unstable]` (this is what you probably want to do)
|
||||
|
|
||||
LL + #[rustc_const_unstable(feature = "...", issue = "...")]
|
||||
|
||||
@@ -4,7 +4,7 @@ error: const function that might be (indirectly) exposed to stable cannot use `#
|
||||
LL | unstable_if_unmarked_const_fn_crate::not_stably_const();
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: mark the callee as `#[rustc_const_stable_indirect]` if it does not itself require any unsafe features
|
||||
= help: mark the callee as `#[rustc_const_stable_indirect]` if it does not itself require any unstable features
|
||||
help: if the caller is not (yet) meant to be exposed to stable, add `#[rustc_const_unstable]` (this is what you probably want to do)
|
||||
|
|
||||
LL + #[rustc_const_unstable(feature = "...", issue = "...")]
|
||||
|
||||
@@ -4,7 +4,7 @@ error: const function that might be (indirectly) exposed to stable cannot use `#
|
||||
LL | not_stably_const();
|
||||
| ^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: mark the callee as `#[rustc_const_stable_indirect]` if it does not itself require any unsafe features
|
||||
= help: mark the callee as `#[rustc_const_stable_indirect]` if it does not itself require any unstable features
|
||||
help: if the caller is not (yet) meant to be exposed to stable, add `#[rustc_const_unstable]` (this is what you probably want to do)
|
||||
|
|
||||
LL + #[rustc_const_unstable(feature = "...", issue = "...")]
|
||||
|
||||
@@ -81,20 +81,11 @@
|
||||
#![crate_name = "0900"]
|
||||
#![crate_type = "bin"] // cannot pass "0800" here
|
||||
|
||||
#![crate_id = "10"]
|
||||
//~^ WARN use of deprecated attribute
|
||||
//~| HELP remove this attribute
|
||||
//~| NOTE `#[warn(deprecated)]` on by default
|
||||
|
||||
// FIXME(#44232) we should warn that this isn't used.
|
||||
#![feature(rust1)]
|
||||
//~^ WARN no longer requires an attribute to enable
|
||||
//~| NOTE `#[warn(stable_features)]` on by default
|
||||
|
||||
#![no_start]
|
||||
//~^ WARN use of deprecated attribute
|
||||
//~| HELP remove this attribute
|
||||
|
||||
// (cannot easily gating state of crate-level #[no_main]; but non crate-level is below at "0400")
|
||||
#![no_builtins]
|
||||
#![recursion_limit = "0200"]
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -106,7 +106,7 @@ error: const function that might be (indirectly) exposed to stable cannot use `#
|
||||
LL | const_context_not_const_stable();
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: mark the callee as `#[rustc_const_stable_indirect]` if it does not itself require any unsafe features
|
||||
= help: mark the callee as `#[rustc_const_stable_indirect]` if it does not itself require any unstable features
|
||||
help: if the caller is not (yet) meant to be exposed to stable, add `#[rustc_const_unstable]` (this is what you probably want to do)
|
||||
|
|
||||
LL + #[rustc_const_unstable(feature = "...", issue = "...")]
|
||||
|
||||
Reference in New Issue
Block a user