Auto merge of #62873 - Centril:rollup-ncnuelj, r=Centril
Rollup of 14 pull requests Successful merges: - #62709 (Test that maplike FromIter satisfies uniqueness) - #62713 (Stabilize <*mut _>::cast and <*const _>::cast) - #62746 ( do not use assume_init in std::io) - #62787 (Fix typo in src/libstd/net/udp.rs doc comment) - #62788 (normalize use of backticks in compiler messages for libcore/ptr) - #62799 (use const array repeat expressions for uninit_array) - #62810 (normalize use of backticks in compiler messages for librustc_lint) - #62812 (normalize use of backticks in compiler messages for librustc_metadata) - #62832 (normalize use of backticks in compiler messages for librustc_incremental) - #62845 (read: fix doc comment) - #62853 (normalize use of backticks in compiler messages for librustc/hir) - #62854 (Fix typo in Unicode character name) - #62858 (Change wrong variable name.) - #62870 (fix lexing of comments with many \r) Failed merges: r? @ghost
This commit is contained in:
commit
e649e90344
62 changed files with 212 additions and 154 deletions
|
@ -75,10 +75,10 @@ use Entry::*;
|
||||||
///
|
///
|
||||||
/// // look up the values associated with some keys.
|
/// // look up the values associated with some keys.
|
||||||
/// let to_find = ["Up!", "Office Space"];
|
/// let to_find = ["Up!", "Office Space"];
|
||||||
/// for book in &to_find {
|
/// for movie in &to_find {
|
||||||
/// match movie_reviews.get(book) {
|
/// match movie_reviews.get(movie) {
|
||||||
/// Some(review) => println!("{}: {}", book, review),
|
/// Some(review) => println!("{}: {}", movie, review),
|
||||||
/// None => println!("{} is unreviewed.", book)
|
/// None => println!("{} is unreviewed.", movie)
|
||||||
/// }
|
/// }
|
||||||
/// }
|
/// }
|
||||||
///
|
///
|
||||||
|
|
|
@ -106,8 +106,8 @@ impl<K, V> LeafNode<K, V> {
|
||||||
LeafNode {
|
LeafNode {
|
||||||
// As a general policy, we leave fields uninitialized if they can be, as this should
|
// As a general policy, we leave fields uninitialized if they can be, as this should
|
||||||
// be both slightly faster and easier to track in Valgrind.
|
// be both slightly faster and easier to track in Valgrind.
|
||||||
keys: uninitialized_array![_; CAPACITY],
|
keys: uninit_array![_; CAPACITY],
|
||||||
vals: uninitialized_array![_; CAPACITY],
|
vals: uninit_array![_; CAPACITY],
|
||||||
parent: ptr::null(),
|
parent: ptr::null(),
|
||||||
parent_idx: MaybeUninit::uninit(),
|
parent_idx: MaybeUninit::uninit(),
|
||||||
len: 0
|
len: 0
|
||||||
|
@ -159,7 +159,7 @@ impl<K, V> InternalNode<K, V> {
|
||||||
unsafe fn new() -> Self {
|
unsafe fn new() -> Self {
|
||||||
InternalNode {
|
InternalNode {
|
||||||
data: LeafNode::new(),
|
data: LeafNode::new(),
|
||||||
edges: uninitialized_array![_; 2*B],
|
edges: uninit_array![_; 2*B],
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -77,6 +77,7 @@
|
||||||
#![feature(box_syntax)]
|
#![feature(box_syntax)]
|
||||||
#![feature(cfg_target_has_atomic)]
|
#![feature(cfg_target_has_atomic)]
|
||||||
#![feature(coerce_unsized)]
|
#![feature(coerce_unsized)]
|
||||||
|
#![cfg_attr(not(bootstrap), feature(const_in_array_repeat_expressions))]
|
||||||
#![feature(dispatch_from_dyn)]
|
#![feature(dispatch_from_dyn)]
|
||||||
#![feature(core_intrinsics)]
|
#![feature(core_intrinsics)]
|
||||||
#![feature(dropck_eyepatch)]
|
#![feature(dropck_eyepatch)]
|
||||||
|
@ -84,6 +85,7 @@
|
||||||
#![feature(fmt_internals)]
|
#![feature(fmt_internals)]
|
||||||
#![feature(fn_traits)]
|
#![feature(fn_traits)]
|
||||||
#![feature(fundamental)]
|
#![feature(fundamental)]
|
||||||
|
#![feature(internal_uninit_const)]
|
||||||
#![feature(lang_items)]
|
#![feature(lang_items)]
|
||||||
#![feature(libc)]
|
#![feature(libc)]
|
||||||
#![feature(nll)]
|
#![feature(nll)]
|
||||||
|
|
|
@ -12,10 +12,11 @@ fn float_to_decimal_common_exact<T>(fmt: &mut Formatter<'_>, num: &T,
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut buf = MaybeUninit::<[u8; 1024]>::uninit(); // enough for f32 and f64
|
let mut buf = MaybeUninit::<[u8; 1024]>::uninit(); // enough for f32 and f64
|
||||||
let mut parts = MaybeUninit::<[flt2dec::Part<'_>; 4]>::uninit();
|
let mut parts = MaybeUninit::<[flt2dec::Part<'_>; 4]>::uninit();
|
||||||
// FIXME(#53491): Technically, this is calling `get_mut` on an uninitialized
|
// FIXME(#53491): This is calling `get_mut` on an uninitialized
|
||||||
// `MaybeUninit` (here and elsewhere in this file). Revisit this once
|
// `MaybeUninit` (here and elsewhere in this file). Revisit this once
|
||||||
// we decided whether that is valid or not.
|
// we decided whether that is valid or not.
|
||||||
// Using `freeze` is *not enough*; `flt2dec::Part` is an enum!
|
// We can do this only because we are libstd and coupled to the compiler.
|
||||||
|
// (FWIW, using `freeze` would not be enough; `flt2dec::Part` is an enum!)
|
||||||
let formatted = flt2dec::to_exact_fixed_str(flt2dec::strategy::grisu::format_exact,
|
let formatted = flt2dec::to_exact_fixed_str(flt2dec::strategy::grisu::format_exact,
|
||||||
*num, sign, precision,
|
*num, sign, precision,
|
||||||
false, buf.get_mut(), parts.get_mut());
|
false, buf.get_mut(), parts.get_mut());
|
||||||
|
|
|
@ -51,7 +51,7 @@ trait GenericRadix {
|
||||||
// characters for a base 2 number.
|
// characters for a base 2 number.
|
||||||
let zero = T::zero();
|
let zero = T::zero();
|
||||||
let is_nonnegative = x >= zero;
|
let is_nonnegative = x >= zero;
|
||||||
let mut buf = uninitialized_array![u8; 128];
|
let mut buf = [MaybeUninit::<u8>::uninit(); 128];
|
||||||
let mut curr = buf.len();
|
let mut curr = buf.len();
|
||||||
let base = T::from_u8(Self::BASE);
|
let base = T::from_u8(Self::BASE);
|
||||||
if is_nonnegative {
|
if is_nonnegative {
|
||||||
|
@ -189,7 +189,7 @@ static DEC_DIGITS_LUT: &[u8; 200] =
|
||||||
macro_rules! impl_Display {
|
macro_rules! impl_Display {
|
||||||
($($t:ident),* as $u:ident via $conv_fn:ident named $name:ident) => {
|
($($t:ident),* as $u:ident via $conv_fn:ident named $name:ident) => {
|
||||||
fn $name(mut n: $u, is_nonnegative: bool, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
fn $name(mut n: $u, is_nonnegative: bool, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||||
let mut buf = uninitialized_array![u8; 39];
|
let mut buf = [MaybeUninit::<u8>::uninit(); 39];
|
||||||
let mut curr = buf.len() as isize;
|
let mut curr = buf.len() as isize;
|
||||||
let buf_ptr = MaybeUninit::first_ptr_mut(&mut buf);
|
let buf_ptr = MaybeUninit::first_ptr_mut(&mut buf);
|
||||||
let lut_ptr = DEC_DIGITS_LUT.as_ptr();
|
let lut_ptr = DEC_DIGITS_LUT.as_ptr();
|
||||||
|
|
|
@ -626,20 +626,37 @@ macro_rules! todo {
|
||||||
/// Creates an array of [`MaybeUninit`].
|
/// Creates an array of [`MaybeUninit`].
|
||||||
///
|
///
|
||||||
/// This macro constructs an uninitialized array of the type `[MaybeUninit<K>; N]`.
|
/// This macro constructs an uninitialized array of the type `[MaybeUninit<K>; N]`.
|
||||||
|
/// It exists solely because bootstrap does not yet support const array-init expressions.
|
||||||
///
|
///
|
||||||
/// [`MaybeUninit`]: mem/union.MaybeUninit.html
|
/// [`MaybeUninit`]: mem/union.MaybeUninit.html
|
||||||
|
// FIXME: Remove both versions of this macro once bootstrap is 1.38.
|
||||||
#[macro_export]
|
#[macro_export]
|
||||||
#[unstable(feature = "maybe_uninit_array", issue = "53491")]
|
#[unstable(feature = "maybe_uninit_array", issue = "53491")]
|
||||||
macro_rules! uninitialized_array {
|
#[cfg(bootstrap)]
|
||||||
|
macro_rules! uninit_array {
|
||||||
// This `assume_init` is safe because an array of `MaybeUninit` does not
|
// This `assume_init` is safe because an array of `MaybeUninit` does not
|
||||||
// require initialization.
|
// require initialization.
|
||||||
// FIXME(#49147): Could be replaced by an array initializer, once those can
|
|
||||||
// be any const expression.
|
|
||||||
($t:ty; $size:expr) => (unsafe {
|
($t:ty; $size:expr) => (unsafe {
|
||||||
MaybeUninit::<[MaybeUninit<$t>; $size]>::uninit().assume_init()
|
MaybeUninit::<[MaybeUninit<$t>; $size]>::uninit().assume_init()
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Creates an array of [`MaybeUninit`].
|
||||||
|
///
|
||||||
|
/// This macro constructs an uninitialized array of the type `[MaybeUninit<K>; N]`.
|
||||||
|
/// It exists solely because bootstrap does not yet support const array-init expressions.
|
||||||
|
///
|
||||||
|
/// [`MaybeUninit`]: mem/union.MaybeUninit.html
|
||||||
|
// FIXME: Just inline this version of the macro once bootstrap is 1.38.
|
||||||
|
#[macro_export]
|
||||||
|
#[unstable(feature = "maybe_uninit_array", issue = "53491")]
|
||||||
|
#[cfg(not(bootstrap))]
|
||||||
|
macro_rules! uninit_array {
|
||||||
|
($t:ty; $size:expr) => (
|
||||||
|
[MaybeUninit::<$t>::UNINIT; $size]
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
/// Built-in macros to the compiler itself.
|
/// Built-in macros to the compiler itself.
|
||||||
///
|
///
|
||||||
/// These macros do not have any corresponding definition with a `macro_rules!`
|
/// These macros do not have any corresponding definition with a `macro_rules!`
|
||||||
|
|
|
@ -252,6 +252,11 @@ impl<T> MaybeUninit<T> {
|
||||||
MaybeUninit { uninit: () }
|
MaybeUninit { uninit: () }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// A promotable constant, equivalent to `uninit()`.
|
||||||
|
#[unstable(feature = "internal_uninit_const", issue = "0",
|
||||||
|
reason = "hack to work around promotability")]
|
||||||
|
pub const UNINIT: Self = Self::uninit();
|
||||||
|
|
||||||
/// Creates a new `MaybeUninit<T>` in an uninitialized state, with the memory being
|
/// Creates a new `MaybeUninit<T>` in an uninitialized state, with the memory being
|
||||||
/// filled with `0` bytes. It depends on `T` whether that already makes for
|
/// filled with `0` bytes. It depends on `T` whether that already makes for
|
||||||
/// proper initialization. For example, `MaybeUninit<usize>::zeroed()` is initialized,
|
/// proper initialization. For example, `MaybeUninit<usize>::zeroed()` is initialized,
|
||||||
|
|
|
@ -1043,7 +1043,7 @@ impl<T: ?Sized> *const T {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Cast to a pointer to a different type
|
/// Cast to a pointer to a different type
|
||||||
#[unstable(feature = "ptr_cast", issue = "60602")]
|
#[stable(feature = "ptr_cast", since = "1.38.0")]
|
||||||
#[inline]
|
#[inline]
|
||||||
pub const fn cast<U>(self) -> *const U {
|
pub const fn cast<U>(self) -> *const U {
|
||||||
self as _
|
self as _
|
||||||
|
@ -1678,7 +1678,7 @@ impl<T: ?Sized> *mut T {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Cast to a pointer to a different type
|
/// Cast to a pointer to a different type
|
||||||
#[unstable(feature = "ptr_cast", issue = "60602")]
|
#[stable(feature = "ptr_cast", since = "1.38.0")]
|
||||||
#[inline]
|
#[inline]
|
||||||
pub const fn cast<U>(self) -> *mut U {
|
pub const fn cast<U>(self) -> *mut U {
|
||||||
self as _
|
self as _
|
||||||
|
|
|
@ -26,8 +26,8 @@ use crate::ptr::NonNull;
|
||||||
/// Unlike `*mut T`, `Unique<T>` is covariant over `T`. This should always be correct
|
/// Unlike `*mut T`, `Unique<T>` is covariant over `T`. This should always be correct
|
||||||
/// for any type which upholds Unique's aliasing requirements.
|
/// for any type which upholds Unique's aliasing requirements.
|
||||||
#[unstable(feature = "ptr_internals", issue = "0",
|
#[unstable(feature = "ptr_internals", issue = "0",
|
||||||
reason = "use NonNull instead and consider PhantomData<T> \
|
reason = "use `NonNull` instead and consider `PhantomData<T>` \
|
||||||
(if you also use #[may_dangle]), Send, and/or Sync")]
|
(if you also use `#[may_dangle]`), `Send`, and/or `Sync`")]
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
#[repr(transparent)]
|
#[repr(transparent)]
|
||||||
#[rustc_layout_scalar_valid_range_start(1)]
|
#[rustc_layout_scalar_valid_range_start(1)]
|
||||||
|
|
|
@ -216,14 +216,14 @@ fn partition_in_blocks<T, F>(v: &mut [T], pivot: &T, is_less: &mut F) -> usize
|
||||||
let mut block_l = BLOCK;
|
let mut block_l = BLOCK;
|
||||||
let mut start_l = ptr::null_mut();
|
let mut start_l = ptr::null_mut();
|
||||||
let mut end_l = ptr::null_mut();
|
let mut end_l = ptr::null_mut();
|
||||||
let mut offsets_l: [MaybeUninit<u8>; BLOCK] = uninitialized_array![u8; BLOCK];
|
let mut offsets_l = [MaybeUninit::<u8>::uninit(); BLOCK];
|
||||||
|
|
||||||
// The current block on the right side (from `r.sub(block_r)` to `r`).
|
// The current block on the right side (from `r.sub(block_r)` to `r`).
|
||||||
let mut r = unsafe { l.add(v.len()) };
|
let mut r = unsafe { l.add(v.len()) };
|
||||||
let mut block_r = BLOCK;
|
let mut block_r = BLOCK;
|
||||||
let mut start_r = ptr::null_mut();
|
let mut start_r = ptr::null_mut();
|
||||||
let mut end_r = ptr::null_mut();
|
let mut end_r = ptr::null_mut();
|
||||||
let mut offsets_r: [MaybeUninit<u8>; BLOCK] = uninitialized_array![u8; BLOCK];
|
let mut offsets_r = [MaybeUninit::<u8>::uninit(); BLOCK];
|
||||||
|
|
||||||
// FIXME: When we get VLAs, try creating one array of length `min(v.len(), 2 * BLOCK)` rather
|
// FIXME: When we get VLAs, try creating one array of length `min(v.len(), 2 * BLOCK)` rather
|
||||||
// than two fixed-size arrays of length `BLOCK`. VLAs might be more cache-efficient.
|
// than two fixed-size arrays of length `BLOCK`. VLAs might be more cache-efficient.
|
||||||
|
|
|
@ -69,14 +69,14 @@ impl CrateNum {
|
||||||
pub fn as_usize(self) -> usize {
|
pub fn as_usize(self) -> usize {
|
||||||
match self {
|
match self {
|
||||||
CrateNum::Index(id) => id.as_usize(),
|
CrateNum::Index(id) => id.as_usize(),
|
||||||
_ => bug!("tried to get index of nonstandard crate {:?}", self),
|
_ => bug!("tried to get index of non-standard crate {:?}", self),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn as_u32(self) -> u32 {
|
pub fn as_u32(self) -> u32 {
|
||||||
match self {
|
match self {
|
||||||
CrateNum::Index(id) => id.as_u32(),
|
CrateNum::Index(id) => id.as_u32(),
|
||||||
_ => bug!("tried to get index of nonstandard crate {:?}", self),
|
_ => bug!("tried to get index of non-standard crate {:?}", self),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1693,8 +1693,8 @@ impl<'a> LoweringContext<'a> {
|
||||||
if pos == ImplTraitPosition::Binding &&
|
if pos == ImplTraitPosition::Binding &&
|
||||||
nightly_options::is_nightly_build() {
|
nightly_options::is_nightly_build() {
|
||||||
help!(err,
|
help!(err,
|
||||||
"add #![feature(impl_trait_in_bindings)] to the crate attributes \
|
"add `#![feature(impl_trait_in_bindings)]` to the crate \
|
||||||
to enable");
|
attributes to enable");
|
||||||
}
|
}
|
||||||
err.emit();
|
err.emit();
|
||||||
hir::TyKind::Err
|
hir::TyKind::Err
|
||||||
|
|
|
@ -190,7 +190,7 @@ fn check_paths<'tcx>(tcx: TyCtxt<'tcx>, if_this_changed: &Sources, then_this_wou
|
||||||
for &(target_span, _, _, _) in then_this_would_need {
|
for &(target_span, _, _, _) in then_this_would_need {
|
||||||
tcx.sess.span_err(
|
tcx.sess.span_err(
|
||||||
target_span,
|
target_span,
|
||||||
"no #[rustc_if_this_changed] annotation detected");
|
"no `#[rustc_if_this_changed]` annotation detected");
|
||||||
|
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -610,7 +610,7 @@ impl FindAllAttrs<'tcx> {
|
||||||
for attr in &self.found_attrs {
|
for attr in &self.found_attrs {
|
||||||
if !checked_attrs.contains(&attr.id) {
|
if !checked_attrs.contains(&attr.id) {
|
||||||
self.tcx.sess.span_err(attr.span, &format!("found unchecked \
|
self.tcx.sess.span_err(attr.span, &format!("found unchecked \
|
||||||
#[rustc_dirty]/#[rustc_clean] attribute"));
|
`#[rustc_dirty]` / `#[rustc_clean]` attribute"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -538,7 +538,7 @@ fn find_source_directory_in_iter<I>(iter: I,
|
||||||
if source_directories_already_tried.contains(&session_dir) ||
|
if source_directories_already_tried.contains(&session_dir) ||
|
||||||
!is_session_directory(&directory_name) ||
|
!is_session_directory(&directory_name) ||
|
||||||
!is_finalized(&directory_name) {
|
!is_finalized(&directory_name) {
|
||||||
debug!("find_source_directory_in_iter - ignoring.");
|
debug!("find_source_directory_in_iter - ignoring");
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -693,7 +693,7 @@ pub fn garbage_collect_session_directories(sess: &Session) -> io::Result<()> {
|
||||||
let timestamp = match extract_timestamp_from_session_dir(lock_file_name) {
|
let timestamp = match extract_timestamp_from_session_dir(lock_file_name) {
|
||||||
Ok(timestamp) => timestamp,
|
Ok(timestamp) => timestamp,
|
||||||
Err(()) => {
|
Err(()) => {
|
||||||
debug!("Found lock-file with malformed timestamp: {}",
|
debug!("found lock-file with malformed timestamp: {}",
|
||||||
crate_directory.join(&lock_file_name).display());
|
crate_directory.join(&lock_file_name).display());
|
||||||
// Ignore it
|
// Ignore it
|
||||||
continue
|
continue
|
||||||
|
@ -746,7 +746,7 @@ pub fn garbage_collect_session_directories(sess: &Session) -> io::Result<()> {
|
||||||
let timestamp = match extract_timestamp_from_session_dir(directory_name) {
|
let timestamp = match extract_timestamp_from_session_dir(directory_name) {
|
||||||
Ok(timestamp) => timestamp,
|
Ok(timestamp) => timestamp,
|
||||||
Err(()) => {
|
Err(()) => {
|
||||||
debug!("Found session-dir with malformed timestamp: {}",
|
debug!("found session-dir with malformed timestamp: {}",
|
||||||
crate_directory.join(directory_name).display());
|
crate_directory.join(directory_name).display());
|
||||||
// Ignore it
|
// Ignore it
|
||||||
continue
|
continue
|
||||||
|
|
|
@ -591,7 +591,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for MissingDebugImplementations {
|
||||||
if !self.impling_types.as_ref().unwrap().contains(&item.hir_id) {
|
if !self.impling_types.as_ref().unwrap().contains(&item.hir_id) {
|
||||||
cx.span_lint(MISSING_DEBUG_IMPLEMENTATIONS,
|
cx.span_lint(MISSING_DEBUG_IMPLEMENTATIONS,
|
||||||
item.span,
|
item.span,
|
||||||
"type does not implement `fmt::Debug`; consider adding #[derive(Debug)] \
|
"type does not implement `fmt::Debug`; consider adding `#[derive(Debug)]` \
|
||||||
or a manual implementation")
|
or a manual implementation")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -867,7 +867,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for InvalidNoMangleItems {
|
||||||
if attr::contains_name(&it.attrs, sym::no_mangle) {
|
if attr::contains_name(&it.attrs, sym::no_mangle) {
|
||||||
// Const items do not refer to a particular location in memory, and therefore
|
// Const items do not refer to a particular location in memory, and therefore
|
||||||
// don't have anything to attach a symbol to
|
// don't have anything to attach a symbol to
|
||||||
let msg = "const items should never be #[no_mangle]";
|
let msg = "const items should never be `#[no_mangle]`";
|
||||||
let mut err = cx.struct_span_lint(NO_MANGLE_CONST_ITEMS, it.span, msg);
|
let mut err = cx.struct_span_lint(NO_MANGLE_CONST_ITEMS, it.span, msg);
|
||||||
|
|
||||||
// account for "pub const" (#45562)
|
// account for "pub const" (#45562)
|
||||||
|
@ -1358,7 +1358,7 @@ impl EarlyLintPass for EllipsisInclusiveRangePatterns {
|
||||||
declare_lint! {
|
declare_lint! {
|
||||||
UNNAMEABLE_TEST_ITEMS,
|
UNNAMEABLE_TEST_ITEMS,
|
||||||
Warn,
|
Warn,
|
||||||
"detects an item that cannot be named being marked as #[test_case]",
|
"detects an item that cannot be named being marked as `#[test_case]`",
|
||||||
report_in_external_macro: true
|
report_in_external_macro: true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -481,9 +481,9 @@ pub fn register_builtins(store: &mut lint::LintStore, sess: Option<&Session>) {
|
||||||
store.register_removed("resolve_trait_on_defaulted_unit",
|
store.register_removed("resolve_trait_on_defaulted_unit",
|
||||||
"converted into hard error, see https://github.com/rust-lang/rust/issues/48950");
|
"converted into hard error, see https://github.com/rust-lang/rust/issues/48950");
|
||||||
store.register_removed("private_no_mangle_fns",
|
store.register_removed("private_no_mangle_fns",
|
||||||
"no longer a warning, #[no_mangle] functions always exported");
|
"no longer a warning, `#[no_mangle]` functions always exported");
|
||||||
store.register_removed("private_no_mangle_statics",
|
store.register_removed("private_no_mangle_statics",
|
||||||
"no longer a warning, #[no_mangle] statics always exported");
|
"no longer a warning, `#[no_mangle]` statics always exported");
|
||||||
store.register_removed("bad_repr",
|
store.register_removed("bad_repr",
|
||||||
"replaced with a generic attribute input check");
|
"replaced with a generic attribute input check");
|
||||||
store.register_removed("duplicate_matcher_binding_name",
|
store.register_removed("duplicate_matcher_binding_name",
|
||||||
|
|
|
@ -24,7 +24,7 @@ use log::debug;
|
||||||
declare_lint! {
|
declare_lint! {
|
||||||
pub UNUSED_MUST_USE,
|
pub UNUSED_MUST_USE,
|
||||||
Warn,
|
Warn,
|
||||||
"unused result of a type flagged as #[must_use]",
|
"unused result of a type flagged as `#[must_use]`",
|
||||||
report_in_external_macro: true
|
report_in_external_macro: true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -316,7 +316,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for UnusedAttributes {
|
||||||
|
|
||||||
let name = attr.name_or_empty();
|
let name = attr.name_or_empty();
|
||||||
if !attr::is_used(attr) {
|
if !attr::is_used(attr) {
|
||||||
debug!("Emitting warning for: {:?}", attr);
|
debug!("emitting warning for: {:?}", attr);
|
||||||
cx.span_lint(UNUSED_ATTRIBUTES, attr.span, "unused attribute");
|
cx.span_lint(UNUSED_ATTRIBUTES, attr.span, "unused attribute");
|
||||||
// Is it a builtin attribute that must be used at the crate level?
|
// Is it a builtin attribute that must be used at the crate level?
|
||||||
let known_crate = attr_info.map(|&&(_, ty, ..)| {
|
let known_crate = attr_info.map(|&&(_, ty, ..)| {
|
||||||
|
@ -332,7 +332,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for UnusedAttributes {
|
||||||
let msg = match attr.style {
|
let msg = match attr.style {
|
||||||
ast::AttrStyle::Outer => {
|
ast::AttrStyle::Outer => {
|
||||||
"crate-level attribute should be an inner attribute: add an exclamation \
|
"crate-level attribute should be an inner attribute: add an exclamation \
|
||||||
mark: #![foo]"
|
mark: `#![foo]`"
|
||||||
}
|
}
|
||||||
ast::AttrStyle::Inner => "crate-level attribute should be in the root module",
|
ast::AttrStyle::Inner => "crate-level attribute should be in the root module",
|
||||||
};
|
};
|
||||||
|
@ -570,9 +570,9 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for UnusedAllocation {
|
||||||
if let adjustment::Adjust::Borrow(adjustment::AutoBorrow::Ref(_, m)) = adj.kind {
|
if let adjustment::Adjust::Borrow(adjustment::AutoBorrow::Ref(_, m)) = adj.kind {
|
||||||
let msg = match m {
|
let msg = match m {
|
||||||
adjustment::AutoBorrowMutability::Immutable =>
|
adjustment::AutoBorrowMutability::Immutable =>
|
||||||
"unnecessary allocation, use & instead",
|
"unnecessary allocation, use `&` instead",
|
||||||
adjustment::AutoBorrowMutability::Mutable { .. }=>
|
adjustment::AutoBorrowMutability::Mutable { .. }=>
|
||||||
"unnecessary allocation, use &mut instead"
|
"unnecessary allocation, use `&mut` instead"
|
||||||
};
|
};
|
||||||
cx.span_lint(UNUSED_ALLOCATION, e.span, msg);
|
cx.span_lint(UNUSED_ALLOCATION, e.span, msg);
|
||||||
}
|
}
|
||||||
|
|
|
@ -938,14 +938,14 @@ impl<'a> CrateLoader<'a> {
|
||||||
}
|
}
|
||||||
match global_allocator {
|
match global_allocator {
|
||||||
Some(Some(other_crate)) => {
|
Some(Some(other_crate)) => {
|
||||||
self.sess.err(&format!("the #[global_allocator] in {} \
|
self.sess.err(&format!("the `#[global_allocator]` in {} \
|
||||||
conflicts with this global \
|
conflicts with this global \
|
||||||
allocator in: {}",
|
allocator in: {}",
|
||||||
other_crate,
|
other_crate,
|
||||||
data.root.name));
|
data.root.name));
|
||||||
}
|
}
|
||||||
Some(None) => {
|
Some(None) => {
|
||||||
self.sess.err(&format!("the #[global_allocator] in this \
|
self.sess.err(&format!("the `#[global_allocator]` in this \
|
||||||
crate conflicts with global \
|
crate conflicts with global \
|
||||||
allocator in: {}", data.root.name));
|
allocator in: {}", data.root.name));
|
||||||
}
|
}
|
||||||
|
@ -971,7 +971,7 @@ impl<'a> CrateLoader<'a> {
|
||||||
if !has_default {
|
if !has_default {
|
||||||
self.sess.err("no global memory allocator found but one is \
|
self.sess.err("no global memory allocator found but one is \
|
||||||
required; link to std or \
|
required; link to std or \
|
||||||
add #[global_allocator] to a static item \
|
add `#[global_allocator]` to a static item \
|
||||||
that implements the GlobalAlloc trait.");
|
that implements the GlobalAlloc trait.");
|
||||||
}
|
}
|
||||||
self.sess.allocator_kind.set(Some(AllocatorKind::DefaultLib));
|
self.sess.allocator_kind.set(Some(AllocatorKind::DefaultLib));
|
||||||
|
|
|
@ -7,7 +7,8 @@ E0454: r##"
|
||||||
A link name was given with an empty name. Erroneous code example:
|
A link name was given with an empty name. Erroneous code example:
|
||||||
|
|
||||||
```ignore (cannot-test-this-because-rustdoc-stops-compile-fail-before-codegen)
|
```ignore (cannot-test-this-because-rustdoc-stops-compile-fail-before-codegen)
|
||||||
#[link(name = "")] extern {} // error: #[link(name = "")] given with empty name
|
#[link(name = "")] extern {}
|
||||||
|
// error: `#[link(name = "")]` given with empty name
|
||||||
```
|
```
|
||||||
|
|
||||||
The rust compiler cannot link to an external library if you don't give it its
|
The rust compiler cannot link to an external library if you don't give it its
|
||||||
|
@ -61,7 +62,7 @@ A link was used without a name parameter. Erroneous code example:
|
||||||
|
|
||||||
```ignore (cannot-test-this-because-rustdoc-stops-compile-fail-before-codegen)
|
```ignore (cannot-test-this-because-rustdoc-stops-compile-fail-before-codegen)
|
||||||
#[link(kind = "dylib")] extern {}
|
#[link(kind = "dylib")] extern {}
|
||||||
// error: #[link(...)] specified without `name = "foo"`
|
// error: `#[link(...)]` specified without `name = "foo"`
|
||||||
```
|
```
|
||||||
|
|
||||||
Please add the name parameter to allow the rust compiler to find the library
|
Please add the name parameter to allow the rust compiler to find the library
|
||||||
|
|
|
@ -102,7 +102,7 @@ impl ItemLikeVisitor<'tcx> for Collector<'tcx> {
|
||||||
match item.value_str() {
|
match item.value_str() {
|
||||||
Some(s) => lib.wasm_import_module = Some(s),
|
Some(s) => lib.wasm_import_module = Some(s),
|
||||||
None => {
|
None => {
|
||||||
let msg = "must be of the form #[link(wasm_import_module = \"...\")]";
|
let msg = "must be of the form `#[link(wasm_import_module = \"...\")]`";
|
||||||
self.tcx.sess.span_err(item.span(), msg);
|
self.tcx.sess.span_err(item.span(), msg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -117,7 +117,7 @@ impl ItemLikeVisitor<'tcx> for Collector<'tcx> {
|
||||||
let requires_name = kind_specified || lib.wasm_import_module.is_none();
|
let requires_name = kind_specified || lib.wasm_import_module.is_none();
|
||||||
if lib.name.is_none() && requires_name {
|
if lib.name.is_none() && requires_name {
|
||||||
struct_span_err!(self.tcx.sess, m.span, E0459,
|
struct_span_err!(self.tcx.sess, m.span, E0459,
|
||||||
"#[link(...)] specified without \
|
"`#[link(...)]` specified without \
|
||||||
`name = \"foo\"`")
|
`name = \"foo\"`")
|
||||||
.span_label(m.span, "missing `name` argument")
|
.span_label(m.span, "missing `name` argument")
|
||||||
.emit();
|
.emit();
|
||||||
|
@ -136,7 +136,7 @@ impl Collector<'tcx> {
|
||||||
match span {
|
match span {
|
||||||
Some(span) => {
|
Some(span) => {
|
||||||
struct_span_err!(self.tcx.sess, span, E0454,
|
struct_span_err!(self.tcx.sess, span, E0454,
|
||||||
"#[link(name = \"\")] given with empty name")
|
"`#[link(name = \"\")]` given with empty name")
|
||||||
.span_label(span, "empty name given")
|
.span_label(span, "empty name given")
|
||||||
.emit();
|
.emit();
|
||||||
}
|
}
|
||||||
|
@ -187,7 +187,7 @@ impl Collector<'tcx> {
|
||||||
&format!("an empty renaming target was specified for library `{}`",name));
|
&format!("an empty renaming target was specified for library `{}`",name));
|
||||||
} else if !any_duplicate {
|
} else if !any_duplicate {
|
||||||
self.tcx.sess.err(&format!("renaming of the library `{}` was specified, \
|
self.tcx.sess.err(&format!("renaming of the library `{}` was specified, \
|
||||||
however this crate contains no #[link(...)] \
|
however this crate contains no `#[link(...)]` \
|
||||||
attributes referencing this library.", name));
|
attributes referencing this library.", name));
|
||||||
} else if renames.contains(name) {
|
} else if renames.contains(name) {
|
||||||
self.tcx.sess.err(&format!("multiple renamings were \
|
self.tcx.sess.err(&format!("multiple renamings were \
|
||||||
|
|
|
@ -3138,13 +3138,15 @@ mod test_map {
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_from_iter() {
|
fn test_from_iter() {
|
||||||
let xs = [(1, 1), (2, 2), (3, 3), (4, 4), (5, 5), (6, 6)];
|
let xs = [(1, 1), (2, 2), (2, 2), (3, 3), (4, 4), (5, 5), (6, 6)];
|
||||||
|
|
||||||
let map: HashMap<_, _> = xs.iter().cloned().collect();
|
let map: HashMap<_, _> = xs.iter().cloned().collect();
|
||||||
|
|
||||||
for &(k, v) in &xs {
|
for &(k, v) in &xs {
|
||||||
assert_eq!(map.get(&k), Some(&v));
|
assert_eq!(map.get(&k), Some(&v));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
assert_eq!(map.iter().len(), xs.len() - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
|
|
@ -1782,13 +1782,15 @@ mod test_set {
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_from_iter() {
|
fn test_from_iter() {
|
||||||
let xs = [1, 2, 3, 4, 5, 6, 7, 8, 9];
|
let xs = [1, 2, 2, 3, 4, 5, 6, 7, 8, 9];
|
||||||
|
|
||||||
let set: HashSet<_> = xs.iter().cloned().collect();
|
let set: HashSet<_> = xs.iter().cloned().collect();
|
||||||
|
|
||||||
for x in &xs {
|
for x in &xs {
|
||||||
assert!(set.contains(x));
|
assert!(set.contains(x));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
assert_eq!(set.iter().len(), xs.len() - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
|
|
@ -511,8 +511,8 @@ pub trait Read {
|
||||||
///
|
///
|
||||||
/// Correspondingly, however, *callers* of this method may not assume any guarantees
|
/// Correspondingly, however, *callers* of this method may not assume any guarantees
|
||||||
/// about how the implementation uses `buf`. The trait is safe to implement,
|
/// about how the implementation uses `buf`. The trait is safe to implement,
|
||||||
// so it is possible that the code that's supposed to write to the buffer might also read
|
/// so it is possible that the code that's supposed to write to the buffer might also read
|
||||||
// from it. It is your responsibility to make sure that `buf` is initialized
|
/// from it. It is your responsibility to make sure that `buf` is initialized
|
||||||
/// before calling `read`. Calling `read` with an uninitialized `buf` (of the kind one
|
/// before calling `read`. Calling `read` with an uninitialized `buf` (of the kind one
|
||||||
/// obtains via [`MaybeUninit<T>`]) is not safe, and can lead to undefined behavior.
|
/// obtains via [`MaybeUninit<T>`]) is not safe, and can lead to undefined behavior.
|
||||||
///
|
///
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
use crate::fmt;
|
use crate::fmt;
|
||||||
use crate::io::{self, Read, Initializer, Write, ErrorKind, BufRead, IoSlice, IoSliceMut};
|
use crate::io::{self, Read, Initializer, Write, ErrorKind, BufRead, IoSlice, IoSliceMut};
|
||||||
use crate::mem;
|
use crate::mem::MaybeUninit;
|
||||||
|
|
||||||
/// Copies the entire contents of a reader into a writer.
|
/// Copies the entire contents of a reader into a writer.
|
||||||
///
|
///
|
||||||
|
@ -43,27 +43,23 @@ use crate::mem;
|
||||||
pub fn copy<R: ?Sized, W: ?Sized>(reader: &mut R, writer: &mut W) -> io::Result<u64>
|
pub fn copy<R: ?Sized, W: ?Sized>(reader: &mut R, writer: &mut W) -> io::Result<u64>
|
||||||
where R: Read, W: Write
|
where R: Read, W: Write
|
||||||
{
|
{
|
||||||
let mut buf = unsafe {
|
let mut buf = MaybeUninit::<[u8; super::DEFAULT_BUF_SIZE]>::uninit();
|
||||||
// This is still technically undefined behavior due to creating a reference
|
// FIXME(#53491): This is calling `get_mut` and `get_ref` on an uninitialized
|
||||||
// to uninitialized data, but within libstd we can rely on more guarantees
|
// `MaybeUninit`. Revisit this once we decided whether that is valid or not.
|
||||||
// than if this code were in an external lib
|
// This is still technically undefined behavior due to creating a reference
|
||||||
|
// to uninitialized data, but within libstd we can rely on more guarantees
|
||||||
// FIXME: This should probably be changed to an array of `MaybeUninit<u8>`
|
// than if this code were in an external lib.
|
||||||
// once the `mem::MaybeUninit` slice APIs stabilize
|
unsafe { reader.initializer().initialize(buf.get_mut()); }
|
||||||
let mut buf: mem::MaybeUninit<[u8; super::DEFAULT_BUF_SIZE]> = mem::MaybeUninit::uninit();
|
|
||||||
reader.initializer().initialize(&mut *buf.as_mut_ptr());
|
|
||||||
buf.assume_init()
|
|
||||||
};
|
|
||||||
|
|
||||||
let mut written = 0;
|
let mut written = 0;
|
||||||
loop {
|
loop {
|
||||||
let len = match reader.read(&mut buf) {
|
let len = match reader.read(unsafe { buf.get_mut() }) {
|
||||||
Ok(0) => return Ok(written),
|
Ok(0) => return Ok(written),
|
||||||
Ok(len) => len,
|
Ok(len) => len,
|
||||||
Err(ref e) if e.kind() == ErrorKind::Interrupted => continue,
|
Err(ref e) if e.kind() == ErrorKind::Interrupted => continue,
|
||||||
Err(e) => return Err(e),
|
Err(e) => return Err(e),
|
||||||
};
|
};
|
||||||
writer.write_all(&buf[..len])?;
|
writer.write_all(unsafe { &buf.get_ref()[..len] })?;
|
||||||
written += len as u64;
|
written += len as u64;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -205,7 +205,7 @@
|
||||||
// Don't link to std. We are std.
|
// Don't link to std. We are std.
|
||||||
#![no_std]
|
#![no_std]
|
||||||
|
|
||||||
//#![warn(deprecated_in_future)] // FIXME: std still has quite a few uses of `mem::uninitialized`
|
#![warn(deprecated_in_future)]
|
||||||
#![warn(missing_docs)]
|
#![warn(missing_docs)]
|
||||||
#![warn(missing_debug_implementations)]
|
#![warn(missing_debug_implementations)]
|
||||||
#![deny(intra_doc_link_resolution_failure)] // rustdoc is run without -D warnings
|
#![deny(intra_doc_link_resolution_failure)] // rustdoc is run without -D warnings
|
||||||
|
@ -272,6 +272,7 @@
|
||||||
#![feature(libc)]
|
#![feature(libc)]
|
||||||
#![feature(link_args)]
|
#![feature(link_args)]
|
||||||
#![feature(linkage)]
|
#![feature(linkage)]
|
||||||
|
#![feature(maybe_uninit_ref)]
|
||||||
#![feature(mem_take)]
|
#![feature(mem_take)]
|
||||||
#![feature(needs_panic_runtime)]
|
#![feature(needs_panic_runtime)]
|
||||||
#![feature(never_type)]
|
#![feature(never_type)]
|
||||||
|
|
|
@ -422,7 +422,7 @@ impl UdpSocket {
|
||||||
/// Sets the value of the `IP_MULTICAST_LOOP` option for this socket.
|
/// Sets the value of the `IP_MULTICAST_LOOP` option for this socket.
|
||||||
///
|
///
|
||||||
/// If enabled, multicast packets will be looped back to the local socket.
|
/// If enabled, multicast packets will be looped back to the local socket.
|
||||||
/// Note that this may not have any affect on IPv6 sockets.
|
/// Note that this may not have any effect on IPv6 sockets.
|
||||||
///
|
///
|
||||||
/// # Examples
|
/// # Examples
|
||||||
///
|
///
|
||||||
|
@ -464,7 +464,7 @@ impl UdpSocket {
|
||||||
/// this socket. The default value is 1 which means that multicast packets
|
/// this socket. The default value is 1 which means that multicast packets
|
||||||
/// don't leave the local network unless explicitly requested.
|
/// don't leave the local network unless explicitly requested.
|
||||||
///
|
///
|
||||||
/// Note that this may not have any affect on IPv6 sockets.
|
/// Note that this may not have any effect on IPv6 sockets.
|
||||||
///
|
///
|
||||||
/// # Examples
|
/// # Examples
|
||||||
///
|
///
|
||||||
|
|
|
@ -163,6 +163,7 @@ pub use self::condvar::{Condvar, WaitTimeoutResult};
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
pub use self::mutex::{Mutex, MutexGuard};
|
pub use self::mutex::{Mutex, MutexGuard};
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
|
#[cfg_attr(bootstrap, allow(deprecated_in_future))]
|
||||||
#[allow(deprecated)]
|
#[allow(deprecated)]
|
||||||
pub use self::once::{Once, OnceState, ONCE_INIT};
|
pub use self::once::{Once, OnceState, ONCE_INIT};
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#![allow(deprecated)] // mem::uninitialized
|
#![allow(deprecated_in_future)] // mem::uninitialized; becomes `deprecated` when nightly is 1.39
|
||||||
|
|
||||||
use crate::io::ErrorKind;
|
use crate::io::ErrorKind;
|
||||||
use crate::mem;
|
use crate::mem;
|
||||||
|
|
|
@ -226,7 +226,7 @@ impl<'a> StringReader<'a> {
|
||||||
loop {
|
loop {
|
||||||
idx = match string[idx..].find('\r') {
|
idx = match string[idx..].find('\r') {
|
||||||
None => break,
|
None => break,
|
||||||
Some(it) => it + 1
|
Some(it) => idx + it + 1
|
||||||
};
|
};
|
||||||
if string[idx..].chars().next() != Some('\n') {
|
if string[idx..].chars().next() != Some('\n') {
|
||||||
self.err_span_(start + BytePos(idx as u32 - 1),
|
self.err_span_(start + BytePos(idx as u32 - 1),
|
||||||
|
|
|
@ -50,7 +50,7 @@ const UNICODE_ARRAY: &[(char, &str, char)] = &[
|
||||||
('─', "Box Drawings Light Horizontal", '-'),
|
('─', "Box Drawings Light Horizontal", '-'),
|
||||||
('━', "Box Drawings Heavy Horizontal", '-'),
|
('━', "Box Drawings Heavy Horizontal", '-'),
|
||||||
('㇐', "CJK Stroke H", '-'),
|
('㇐', "CJK Stroke H", '-'),
|
||||||
('ꟷ', "Latin Epigraphic Letter Dideways", '-'),
|
('ꟷ', "Latin Epigraphic Letter Sideways I", '-'),
|
||||||
('ᅳ', "Hangul Jungseong Eu", '-'),
|
('ᅳ', "Hangul Jungseong Eu", '-'),
|
||||||
('ㅡ', "Hangul Letter Eu", '-'),
|
('ㅡ', "Hangul Letter Eu", '-'),
|
||||||
('一', "CJK Unified Ideograph-4E00", '-'),
|
('一', "CJK Unified Ideograph-4E00", '-'),
|
||||||
|
|
|
@ -11,13 +11,13 @@
|
||||||
fn main() {
|
fn main() {
|
||||||
|
|
||||||
#[rustc_dirty(label="Hir", cfg="cfail2")]
|
#[rustc_dirty(label="Hir", cfg="cfail2")]
|
||||||
//[cfail2]~^ ERROR found unchecked #[rustc_dirty]/#[rustc_clean] attribute
|
//[cfail2]~^ ERROR found unchecked `#[rustc_dirty]` / `#[rustc_clean]` attribute
|
||||||
{
|
{
|
||||||
// empty block
|
// empty block
|
||||||
}
|
}
|
||||||
|
|
||||||
#[rustc_clean(label="Hir", cfg="cfail2")]
|
#[rustc_clean(label="Hir", cfg="cfail2")]
|
||||||
//[cfail2]~^ ERROR found unchecked #[rustc_dirty]/#[rustc_clean] attribute
|
//[cfail2]~^ ERROR found unchecked `#[rustc_dirty]` / `#[rustc_clean]` attribute
|
||||||
{
|
{
|
||||||
// empty block
|
// empty block
|
||||||
}
|
}
|
||||||
|
@ -25,10 +25,10 @@ fn main() {
|
||||||
|
|
||||||
struct _Struct {
|
struct _Struct {
|
||||||
#[rustc_dirty(label="Hir", cfg="cfail2")]
|
#[rustc_dirty(label="Hir", cfg="cfail2")]
|
||||||
//[cfail2]~^ ERROR found unchecked #[rustc_dirty]/#[rustc_clean] attribute
|
//[cfail2]~^ ERROR found unchecked `#[rustc_dirty]` / `#[rustc_clean]` attribute
|
||||||
_field1: i32,
|
_field1: i32,
|
||||||
|
|
||||||
#[rustc_clean(label="Hir", cfg="cfail2")]
|
#[rustc_clean(label="Hir", cfg="cfail2")]
|
||||||
//[cfail2]~^ ERROR found unchecked #[rustc_dirty]/#[rustc_clean] attribute
|
//[cfail2]~^ ERROR found unchecked `#[rustc_dirty]` / `#[rustc_clean]` attribute
|
||||||
_field2: i32,
|
_field2: i32,
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,7 +10,7 @@ note: lint level defined here
|
||||||
LL | #![deny(unused_attributes)]
|
LL | #![deny(unused_attributes)]
|
||||||
| ^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
error: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo]
|
error: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
|
||||||
--> $DIR/plugin-attr-register-deny.rs:14:5
|
--> $DIR/plugin-attr-register-deny.rs:14:5
|
||||||
|
|
|
|
||||||
LL | #[bar]
|
LL | #[bar]
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// aux-build:system-allocator.rs
|
// aux-build:system-allocator.rs
|
||||||
// no-prefer-dynamic
|
// no-prefer-dynamic
|
||||||
// error-pattern: the #[global_allocator] in
|
// error-pattern: the `#[global_allocator]` in
|
||||||
|
|
||||||
extern crate system_allocator;
|
extern crate system_allocator;
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
error: the #[global_allocator] in this crate conflicts with global allocator in: system_allocator
|
error: the `#[global_allocator]` in this crate conflicts with global allocator in: system_allocator
|
||||||
|
|
||||||
error: aborting due to previous error
|
error: aborting due to previous error
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// aux-build:system-allocator.rs
|
// aux-build:system-allocator.rs
|
||||||
// aux-build:system-allocator2.rs
|
// aux-build:system-allocator2.rs
|
||||||
// no-prefer-dynamic
|
// no-prefer-dynamic
|
||||||
// error-pattern: the #[global_allocator] in
|
// error-pattern: the `#[global_allocator]` in
|
||||||
|
|
||||||
|
|
||||||
extern crate system_allocator;
|
extern crate system_allocator;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
error: the #[global_allocator] in system_allocator conflicts with this global allocator in: system_allocator2
|
error: the `#[global_allocator]` in system_allocator conflicts with this global allocator in: system_allocator2
|
||||||
|
|
||||||
error: aborting due to previous error
|
error: aborting due to previous error
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
error[E0459]: #[link(...)] specified without `name = "foo"`
|
error[E0459]: `#[link(...)]` specified without `name = "foo"`
|
||||||
--> $DIR/bad-extern-link-attrs.rs:1:1
|
--> $DIR/bad-extern-link-attrs.rs:1:1
|
||||||
|
|
|
|
||||||
LL | #[link()]
|
LL | #[link()]
|
||||||
| ^^^^^^^^^ missing `name` argument
|
| ^^^^^^^^^ missing `name` argument
|
||||||
|
|
||||||
error[E0454]: #[link(name = "")] given with empty name
|
error[E0454]: `#[link(name = "")]` given with empty name
|
||||||
--> $DIR/bad-extern-link-attrs.rs:2:1
|
--> $DIR/bad-extern-link-attrs.rs:2:1
|
||||||
|
|
|
|
||||||
LL | #[link(name = "")]
|
LL | #[link(name = "")]
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
error[E0454]: #[link(name = "")] given with empty name
|
error[E0454]: `#[link(name = "")]` given with empty name
|
||||||
--> $DIR/empty-linkname.rs:1:1
|
--> $DIR/empty-linkname.rs:1:1
|
||||||
|
|
|
|
||||||
LL | #[link(name = "")]
|
LL | #[link(name = "")]
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
error[E0454]: #[link(name = "")] given with empty name
|
error[E0454]: `#[link(name = "")]` given with empty name
|
||||||
--> $DIR/E0454.rs:1:1
|
--> $DIR/E0454.rs:1:1
|
||||||
|
|
|
|
||||||
LL | #[link(name = "")] extern {}
|
LL | #[link(name = "")] extern {}
|
||||||
|
|
|
@ -6,7 +6,7 @@ LL | #[link(kind = "wonderful_unicorn")] extern {}
|
||||||
| |
|
| |
|
||||||
| unknown kind
|
| unknown kind
|
||||||
|
|
||||||
error[E0459]: #[link(...)] specified without `name = "foo"`
|
error[E0459]: `#[link(...)]` specified without `name = "foo"`
|
||||||
--> $DIR/E0458.rs:1:1
|
--> $DIR/E0458.rs:1:1
|
||||||
|
|
|
|
||||||
LL | #[link(kind = "wonderful_unicorn")] extern {}
|
LL | #[link(kind = "wonderful_unicorn")] extern {}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
error[E0459]: #[link(...)] specified without `name = "foo"`
|
error[E0459]: `#[link(...)]` specified without `name = "foo"`
|
||||||
--> $DIR/E0459.rs:1:1
|
--> $DIR/E0459.rs:1:1
|
||||||
|
|
|
|
||||||
LL | #[link(kind = "dylib")] extern {}
|
LL | #[link(kind = "dylib")] extern {}
|
||||||
|
|
|
@ -632,7 +632,7 @@ warning: unused attribute
|
||||||
LL | #[no_std] fn f() { }
|
LL | #[no_std] fn f() { }
|
||||||
| ^^^^^^^^^
|
| ^^^^^^^^^
|
||||||
|
|
||||||
warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo]
|
warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
|
||||||
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:483:5
|
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:483:5
|
||||||
|
|
|
|
||||||
LL | #[no_std] fn f() { }
|
LL | #[no_std] fn f() { }
|
||||||
|
@ -644,7 +644,7 @@ warning: unused attribute
|
||||||
LL | #[no_std] struct S;
|
LL | #[no_std] struct S;
|
||||||
| ^^^^^^^^^
|
| ^^^^^^^^^
|
||||||
|
|
||||||
warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo]
|
warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
|
||||||
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:487:5
|
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:487:5
|
||||||
|
|
|
|
||||||
LL | #[no_std] struct S;
|
LL | #[no_std] struct S;
|
||||||
|
@ -656,7 +656,7 @@ warning: unused attribute
|
||||||
LL | #[no_std] type T = S;
|
LL | #[no_std] type T = S;
|
||||||
| ^^^^^^^^^
|
| ^^^^^^^^^
|
||||||
|
|
||||||
warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo]
|
warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
|
||||||
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:491:5
|
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:491:5
|
||||||
|
|
|
|
||||||
LL | #[no_std] type T = S;
|
LL | #[no_std] type T = S;
|
||||||
|
@ -668,7 +668,7 @@ warning: unused attribute
|
||||||
LL | #[no_std] impl S { }
|
LL | #[no_std] impl S { }
|
||||||
| ^^^^^^^^^
|
| ^^^^^^^^^
|
||||||
|
|
||||||
warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo]
|
warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
|
||||||
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:495:5
|
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:495:5
|
||||||
|
|
|
|
||||||
LL | #[no_std] impl S { }
|
LL | #[no_std] impl S { }
|
||||||
|
@ -680,7 +680,7 @@ warning: unused attribute
|
||||||
LL | #[no_std]
|
LL | #[no_std]
|
||||||
| ^^^^^^^^^
|
| ^^^^^^^^^
|
||||||
|
|
||||||
warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo]
|
warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
|
||||||
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:475:1
|
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:475:1
|
||||||
|
|
|
|
||||||
LL | #[no_std]
|
LL | #[no_std]
|
||||||
|
@ -704,7 +704,7 @@ warning: unused attribute
|
||||||
LL | #[crate_name = "0900"] fn f() { }
|
LL | #[crate_name = "0900"] fn f() { }
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo]
|
warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
|
||||||
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:638:5
|
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:638:5
|
||||||
|
|
|
|
||||||
LL | #[crate_name = "0900"] fn f() { }
|
LL | #[crate_name = "0900"] fn f() { }
|
||||||
|
@ -716,7 +716,7 @@ warning: unused attribute
|
||||||
LL | #[crate_name = "0900"] struct S;
|
LL | #[crate_name = "0900"] struct S;
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo]
|
warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
|
||||||
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:642:5
|
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:642:5
|
||||||
|
|
|
|
||||||
LL | #[crate_name = "0900"] struct S;
|
LL | #[crate_name = "0900"] struct S;
|
||||||
|
@ -728,7 +728,7 @@ warning: unused attribute
|
||||||
LL | #[crate_name = "0900"] type T = S;
|
LL | #[crate_name = "0900"] type T = S;
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo]
|
warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
|
||||||
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:646:5
|
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:646:5
|
||||||
|
|
|
|
||||||
LL | #[crate_name = "0900"] type T = S;
|
LL | #[crate_name = "0900"] type T = S;
|
||||||
|
@ -740,7 +740,7 @@ warning: unused attribute
|
||||||
LL | #[crate_name = "0900"] impl S { }
|
LL | #[crate_name = "0900"] impl S { }
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo]
|
warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
|
||||||
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:650:5
|
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:650:5
|
||||||
|
|
|
|
||||||
LL | #[crate_name = "0900"] impl S { }
|
LL | #[crate_name = "0900"] impl S { }
|
||||||
|
@ -752,7 +752,7 @@ warning: unused attribute
|
||||||
LL | #[crate_name = "0900"]
|
LL | #[crate_name = "0900"]
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo]
|
warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
|
||||||
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:630:1
|
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:630:1
|
||||||
|
|
|
|
||||||
LL | #[crate_name = "0900"]
|
LL | #[crate_name = "0900"]
|
||||||
|
@ -776,7 +776,7 @@ warning: unused attribute
|
||||||
LL | #[crate_type = "0800"] fn f() { }
|
LL | #[crate_type = "0800"] fn f() { }
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo]
|
warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
|
||||||
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:663:5
|
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:663:5
|
||||||
|
|
|
|
||||||
LL | #[crate_type = "0800"] fn f() { }
|
LL | #[crate_type = "0800"] fn f() { }
|
||||||
|
@ -788,7 +788,7 @@ warning: unused attribute
|
||||||
LL | #[crate_type = "0800"] struct S;
|
LL | #[crate_type = "0800"] struct S;
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo]
|
warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
|
||||||
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:667:5
|
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:667:5
|
||||||
|
|
|
|
||||||
LL | #[crate_type = "0800"] struct S;
|
LL | #[crate_type = "0800"] struct S;
|
||||||
|
@ -800,7 +800,7 @@ warning: unused attribute
|
||||||
LL | #[crate_type = "0800"] type T = S;
|
LL | #[crate_type = "0800"] type T = S;
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo]
|
warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
|
||||||
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:671:5
|
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:671:5
|
||||||
|
|
|
|
||||||
LL | #[crate_type = "0800"] type T = S;
|
LL | #[crate_type = "0800"] type T = S;
|
||||||
|
@ -812,7 +812,7 @@ warning: unused attribute
|
||||||
LL | #[crate_type = "0800"] impl S { }
|
LL | #[crate_type = "0800"] impl S { }
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo]
|
warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
|
||||||
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:675:5
|
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:675:5
|
||||||
|
|
|
|
||||||
LL | #[crate_type = "0800"] impl S { }
|
LL | #[crate_type = "0800"] impl S { }
|
||||||
|
@ -824,7 +824,7 @@ warning: unused attribute
|
||||||
LL | #[crate_type = "0800"]
|
LL | #[crate_type = "0800"]
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo]
|
warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
|
||||||
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:655:1
|
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:655:1
|
||||||
|
|
|
|
||||||
LL | #[crate_type = "0800"]
|
LL | #[crate_type = "0800"]
|
||||||
|
@ -848,7 +848,7 @@ warning: unused attribute
|
||||||
LL | #[feature(x0600)] fn f() { }
|
LL | #[feature(x0600)] fn f() { }
|
||||||
| ^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo]
|
warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
|
||||||
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:688:5
|
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:688:5
|
||||||
|
|
|
|
||||||
LL | #[feature(x0600)] fn f() { }
|
LL | #[feature(x0600)] fn f() { }
|
||||||
|
@ -860,7 +860,7 @@ warning: unused attribute
|
||||||
LL | #[feature(x0600)] struct S;
|
LL | #[feature(x0600)] struct S;
|
||||||
| ^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo]
|
warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
|
||||||
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:692:5
|
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:692:5
|
||||||
|
|
|
|
||||||
LL | #[feature(x0600)] struct S;
|
LL | #[feature(x0600)] struct S;
|
||||||
|
@ -872,7 +872,7 @@ warning: unused attribute
|
||||||
LL | #[feature(x0600)] type T = S;
|
LL | #[feature(x0600)] type T = S;
|
||||||
| ^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo]
|
warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
|
||||||
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:696:5
|
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:696:5
|
||||||
|
|
|
|
||||||
LL | #[feature(x0600)] type T = S;
|
LL | #[feature(x0600)] type T = S;
|
||||||
|
@ -884,7 +884,7 @@ warning: unused attribute
|
||||||
LL | #[feature(x0600)] impl S { }
|
LL | #[feature(x0600)] impl S { }
|
||||||
| ^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo]
|
warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
|
||||||
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:700:5
|
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:700:5
|
||||||
|
|
|
|
||||||
LL | #[feature(x0600)] impl S { }
|
LL | #[feature(x0600)] impl S { }
|
||||||
|
@ -896,7 +896,7 @@ warning: unused attribute
|
||||||
LL | #[feature(x0600)]
|
LL | #[feature(x0600)]
|
||||||
| ^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo]
|
warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
|
||||||
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:680:1
|
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:680:1
|
||||||
|
|
|
|
||||||
LL | #[feature(x0600)]
|
LL | #[feature(x0600)]
|
||||||
|
@ -920,7 +920,7 @@ warning: unused attribute
|
||||||
LL | #[no_main] fn f() { }
|
LL | #[no_main] fn f() { }
|
||||||
| ^^^^^^^^^^
|
| ^^^^^^^^^^
|
||||||
|
|
||||||
warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo]
|
warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
|
||||||
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:714:5
|
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:714:5
|
||||||
|
|
|
|
||||||
LL | #[no_main] fn f() { }
|
LL | #[no_main] fn f() { }
|
||||||
|
@ -932,7 +932,7 @@ warning: unused attribute
|
||||||
LL | #[no_main] struct S;
|
LL | #[no_main] struct S;
|
||||||
| ^^^^^^^^^^
|
| ^^^^^^^^^^
|
||||||
|
|
||||||
warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo]
|
warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
|
||||||
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:718:5
|
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:718:5
|
||||||
|
|
|
|
||||||
LL | #[no_main] struct S;
|
LL | #[no_main] struct S;
|
||||||
|
@ -944,7 +944,7 @@ warning: unused attribute
|
||||||
LL | #[no_main] type T = S;
|
LL | #[no_main] type T = S;
|
||||||
| ^^^^^^^^^^
|
| ^^^^^^^^^^
|
||||||
|
|
||||||
warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo]
|
warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
|
||||||
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:722:5
|
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:722:5
|
||||||
|
|
|
|
||||||
LL | #[no_main] type T = S;
|
LL | #[no_main] type T = S;
|
||||||
|
@ -956,7 +956,7 @@ warning: unused attribute
|
||||||
LL | #[no_main] impl S { }
|
LL | #[no_main] impl S { }
|
||||||
| ^^^^^^^^^^
|
| ^^^^^^^^^^
|
||||||
|
|
||||||
warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo]
|
warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
|
||||||
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:726:5
|
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:726:5
|
||||||
|
|
|
|
||||||
LL | #[no_main] impl S { }
|
LL | #[no_main] impl S { }
|
||||||
|
@ -968,7 +968,7 @@ warning: unused attribute
|
||||||
LL | #[no_main]
|
LL | #[no_main]
|
||||||
| ^^^^^^^^^^
|
| ^^^^^^^^^^
|
||||||
|
|
||||||
warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo]
|
warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
|
||||||
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:706:1
|
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:706:1
|
||||||
|
|
|
|
||||||
LL | #[no_main]
|
LL | #[no_main]
|
||||||
|
@ -992,7 +992,7 @@ warning: unused attribute
|
||||||
LL | #[recursion_limit="0200"] fn f() { }
|
LL | #[recursion_limit="0200"] fn f() { }
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo]
|
warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
|
||||||
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:752:5
|
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:752:5
|
||||||
|
|
|
|
||||||
LL | #[recursion_limit="0200"] fn f() { }
|
LL | #[recursion_limit="0200"] fn f() { }
|
||||||
|
@ -1004,7 +1004,7 @@ warning: unused attribute
|
||||||
LL | #[recursion_limit="0200"] struct S;
|
LL | #[recursion_limit="0200"] struct S;
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo]
|
warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
|
||||||
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:756:5
|
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:756:5
|
||||||
|
|
|
|
||||||
LL | #[recursion_limit="0200"] struct S;
|
LL | #[recursion_limit="0200"] struct S;
|
||||||
|
@ -1016,7 +1016,7 @@ warning: unused attribute
|
||||||
LL | #[recursion_limit="0200"] type T = S;
|
LL | #[recursion_limit="0200"] type T = S;
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo]
|
warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
|
||||||
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:760:5
|
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:760:5
|
||||||
|
|
|
|
||||||
LL | #[recursion_limit="0200"] type T = S;
|
LL | #[recursion_limit="0200"] type T = S;
|
||||||
|
@ -1028,7 +1028,7 @@ warning: unused attribute
|
||||||
LL | #[recursion_limit="0200"] impl S { }
|
LL | #[recursion_limit="0200"] impl S { }
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo]
|
warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
|
||||||
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:764:5
|
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:764:5
|
||||||
|
|
|
|
||||||
LL | #[recursion_limit="0200"] impl S { }
|
LL | #[recursion_limit="0200"] impl S { }
|
||||||
|
@ -1040,7 +1040,7 @@ warning: unused attribute
|
||||||
LL | #[recursion_limit="0200"]
|
LL | #[recursion_limit="0200"]
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo]
|
warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
|
||||||
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:744:1
|
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:744:1
|
||||||
|
|
|
|
||||||
LL | #[recursion_limit="0200"]
|
LL | #[recursion_limit="0200"]
|
||||||
|
@ -1064,7 +1064,7 @@ warning: unused attribute
|
||||||
LL | #[type_length_limit="0100"] fn f() { }
|
LL | #[type_length_limit="0100"] fn f() { }
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo]
|
warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
|
||||||
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:777:5
|
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:777:5
|
||||||
|
|
|
|
||||||
LL | #[type_length_limit="0100"] fn f() { }
|
LL | #[type_length_limit="0100"] fn f() { }
|
||||||
|
@ -1076,7 +1076,7 @@ warning: unused attribute
|
||||||
LL | #[type_length_limit="0100"] struct S;
|
LL | #[type_length_limit="0100"] struct S;
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo]
|
warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
|
||||||
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:781:5
|
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:781:5
|
||||||
|
|
|
|
||||||
LL | #[type_length_limit="0100"] struct S;
|
LL | #[type_length_limit="0100"] struct S;
|
||||||
|
@ -1088,7 +1088,7 @@ warning: unused attribute
|
||||||
LL | #[type_length_limit="0100"] type T = S;
|
LL | #[type_length_limit="0100"] type T = S;
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo]
|
warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
|
||||||
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:785:5
|
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:785:5
|
||||||
|
|
|
|
||||||
LL | #[type_length_limit="0100"] type T = S;
|
LL | #[type_length_limit="0100"] type T = S;
|
||||||
|
@ -1100,7 +1100,7 @@ warning: unused attribute
|
||||||
LL | #[type_length_limit="0100"] impl S { }
|
LL | #[type_length_limit="0100"] impl S { }
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo]
|
warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
|
||||||
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:789:5
|
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:789:5
|
||||||
|
|
|
|
||||||
LL | #[type_length_limit="0100"] impl S { }
|
LL | #[type_length_limit="0100"] impl S { }
|
||||||
|
@ -1112,7 +1112,7 @@ warning: unused attribute
|
||||||
LL | #[type_length_limit="0100"]
|
LL | #[type_length_limit="0100"]
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo]
|
warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
|
||||||
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:769:1
|
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:769:1
|
||||||
|
|
|
|
||||||
LL | #[type_length_limit="0100"]
|
LL | #[type_length_limit="0100"]
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
error[E0658]: use of unstable library feature 'ptr_internals': use NonNull instead and consider PhantomData<T> (if you also use #[may_dangle]), Send, and/or Sync
|
error[E0658]: use of unstable library feature 'ptr_internals': use `NonNull` instead and consider `PhantomData<T>` (if you also use `#[may_dangle]`), `Send`, and/or `Sync`
|
||||||
--> $DIR/issue-49983-see-issue-0.rs:4:30
|
--> $DIR/issue-49983-see-issue-0.rs:4:30
|
||||||
|
|
|
|
||||||
LL | #[allow(unused_imports)] use core::ptr::Unique;
|
LL | #[allow(unused_imports)] use core::ptr::Unique;
|
||||||
|
|
|
@ -121,7 +121,7 @@ error[E0562]: `impl Trait` not allowed outside of function and inherent method r
|
||||||
LL | const _cdef: impl Tr1<As1: Copy> = S1;
|
LL | const _cdef: impl Tr1<As1: Copy> = S1;
|
||||||
| ^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
|
|
||||||
= help: add #![feature(impl_trait_in_bindings)] to the crate attributes to enable
|
= help: add `#![feature(impl_trait_in_bindings)]` to the crate attributes to enable
|
||||||
|
|
||||||
error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
|
error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
|
||||||
--> $DIR/feature-gate-associated_type_bounds.rs:60:15
|
--> $DIR/feature-gate-associated_type_bounds.rs:60:15
|
||||||
|
@ -129,7 +129,7 @@ error[E0562]: `impl Trait` not allowed outside of function and inherent method r
|
||||||
LL | static _sdef: impl Tr1<As1: Copy> = S1;
|
LL | static _sdef: impl Tr1<As1: Copy> = S1;
|
||||||
| ^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
|
|
||||||
= help: add #![feature(impl_trait_in_bindings)] to the crate attributes to enable
|
= help: add `#![feature(impl_trait_in_bindings)]` to the crate attributes to enable
|
||||||
|
|
||||||
error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
|
error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
|
||||||
--> $DIR/feature-gate-associated_type_bounds.rs:67:12
|
--> $DIR/feature-gate-associated_type_bounds.rs:67:12
|
||||||
|
@ -137,7 +137,7 @@ error[E0562]: `impl Trait` not allowed outside of function and inherent method r
|
||||||
LL | let _: impl Tr1<As1: Copy> = S1;
|
LL | let _: impl Tr1<As1: Copy> = S1;
|
||||||
| ^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
|
|
||||||
= help: add #![feature(impl_trait_in_bindings)] to the crate attributes to enable
|
= help: add `#![feature(impl_trait_in_bindings)]` to the crate attributes to enable
|
||||||
|
|
||||||
error: aborting due to 16 previous errors
|
error: aborting due to 16 previous errors
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@ error[E0562]: `impl Trait` not allowed outside of function and inherent method r
|
||||||
LL | const FOO: impl Copy = 42;
|
LL | const FOO: impl Copy = 42;
|
||||||
| ^^^^^^^^^
|
| ^^^^^^^^^
|
||||||
|
|
|
|
||||||
= help: add #![feature(impl_trait_in_bindings)] to the crate attributes to enable
|
= help: add `#![feature(impl_trait_in_bindings)]` to the crate attributes to enable
|
||||||
|
|
||||||
error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
|
error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
|
||||||
--> $DIR/feature-gate-impl_trait_in_bindings.rs:4:13
|
--> $DIR/feature-gate-impl_trait_in_bindings.rs:4:13
|
||||||
|
@ -18,7 +18,7 @@ error[E0562]: `impl Trait` not allowed outside of function and inherent method r
|
||||||
LL | static BAR: impl Copy = 42;
|
LL | static BAR: impl Copy = 42;
|
||||||
| ^^^^^^^^^
|
| ^^^^^^^^^
|
||||||
|
|
|
|
||||||
= help: add #![feature(impl_trait_in_bindings)] to the crate attributes to enable
|
= help: add `#![feature(impl_trait_in_bindings)]` to the crate attributes to enable
|
||||||
|
|
||||||
error: aborting due to 3 previous errors
|
error: aborting due to 3 previous errors
|
||||||
|
|
||||||
|
|
|
@ -232,7 +232,7 @@ error[E0562]: `impl Trait` not allowed outside of function and inherent method r
|
||||||
LL | let _in_local_variable: impl Fn() = || {};
|
LL | let _in_local_variable: impl Fn() = || {};
|
||||||
| ^^^^^^^^^
|
| ^^^^^^^^^
|
||||||
|
|
|
|
||||||
= help: add #![feature(impl_trait_in_bindings)] to the crate attributes to enable
|
= help: add `#![feature(impl_trait_in_bindings)]` to the crate attributes to enable
|
||||||
|
|
||||||
error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
|
error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
|
||||||
--> $DIR/where-allowed.rs:222:46
|
--> $DIR/where-allowed.rs:222:46
|
||||||
|
|
|
@ -10,7 +10,7 @@ note: lint level defined here
|
||||||
LL | #![deny(unused_attributes)]
|
LL | #![deny(unused_attributes)]
|
||||||
| ^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
error: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo]
|
error: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
|
||||||
--> $DIR/invalid-plugin-attr.rs:4:1
|
--> $DIR/invalid-plugin-attr.rs:4:1
|
||||||
|
|
|
|
||||||
LL | #[plugin(bla)]
|
LL | #[plugin(bla)]
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// run-rustfix
|
// run-rustfix
|
||||||
|
|
||||||
#[no_mangle] pub static RAH: usize = 5;
|
#[no_mangle] pub static RAH: usize = 5;
|
||||||
//~^ ERROR const items should never be #[no_mangle]
|
//~^ ERROR const items should never be `#[no_mangle]`
|
||||||
|
|
||||||
fn main() {}
|
fn main() {}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// run-rustfix
|
// run-rustfix
|
||||||
|
|
||||||
#[no_mangle] pub const RAH: usize = 5;
|
#[no_mangle] pub const RAH: usize = 5;
|
||||||
//~^ ERROR const items should never be #[no_mangle]
|
//~^ ERROR const items should never be `#[no_mangle]`
|
||||||
|
|
||||||
fn main() {}
|
fn main() {}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
error: const items should never be #[no_mangle]
|
error: const items should never be `#[no_mangle]`
|
||||||
--> $DIR/issue-45562.rs:3:14
|
--> $DIR/issue-45562.rs:3:14
|
||||||
|
|
|
|
||||||
LL | #[no_mangle] pub const RAH: usize = 5;
|
LL | #[no_mangle] pub const RAH: usize = 5;
|
||||||
|
|
|
@ -22,7 +22,7 @@ error: unused attribute
|
||||||
LL | #[crate_type = "bin"] fn main() {}
|
LL | #[crate_type = "bin"] fn main() {}
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
error: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo]
|
error: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
|
||||||
--> $DIR/lint-misplaced-attr.rs:11:1
|
--> $DIR/lint-misplaced-attr.rs:11:1
|
||||||
|
|
|
|
||||||
LL | #[crate_type = "bin"] fn main() {}
|
LL | #[crate_type = "bin"] fn main() {}
|
||||||
|
|
|
@ -6,10 +6,10 @@ fn foo() {
|
||||||
|
|
||||||
#[allow(dead_code)]
|
#[allow(dead_code)]
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
const FOO: u64 = 1; //~ ERROR const items should never be #[no_mangle]
|
const FOO: u64 = 1; //~ ERROR const items should never be `#[no_mangle]`
|
||||||
|
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub const PUB_FOO: u64 = 1; //~ ERROR const items should never be #[no_mangle]
|
pub const PUB_FOO: u64 = 1; //~ ERROR const items should never be `#[no_mangle]`
|
||||||
|
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub fn bar() {
|
pub fn bar() {
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
warning: lint `private_no_mangle_fns` has been removed: `no longer a warning, #[no_mangle] functions always exported`
|
warning: lint `private_no_mangle_fns` has been removed: `no longer a warning, `#[no_mangle]` functions always exported`
|
||||||
|
|
|
|
||||||
= note: requested on the command line with `-F private_no_mangle_fns`
|
= note: requested on the command line with `-F private_no_mangle_fns`
|
||||||
|
|
||||||
warning: lint `private_no_mangle_statics` has been removed: `no longer a warning, #[no_mangle] statics always exported`
|
warning: lint `private_no_mangle_statics` has been removed: `no longer a warning, `#[no_mangle]` statics always exported`
|
||||||
|
|
|
|
||||||
= note: requested on the command line with `-F private_no_mangle_statics`
|
= note: requested on the command line with `-F private_no_mangle_statics`
|
||||||
|
|
||||||
error: const items should never be #[no_mangle]
|
error: const items should never be `#[no_mangle]`
|
||||||
--> $DIR/lint-unexported-no-mangle.rs:9:1
|
--> $DIR/lint-unexported-no-mangle.rs:9:1
|
||||||
|
|
|
|
||||||
LL | const FOO: u64 = 1;
|
LL | const FOO: u64 = 1;
|
||||||
|
@ -16,7 +16,7 @@ LL | const FOO: u64 = 1;
|
||||||
|
|
|
|
||||||
= note: requested on the command line with `-F no-mangle-const-items`
|
= note: requested on the command line with `-F no-mangle-const-items`
|
||||||
|
|
||||||
error: const items should never be #[no_mangle]
|
error: const items should never be `#[no_mangle]`
|
||||||
--> $DIR/lint-unexported-no-mangle.rs:12:1
|
--> $DIR/lint-unexported-no-mangle.rs:12:1
|
||||||
|
|
|
|
||||||
LL | pub const PUB_FOO: u64 = 1;
|
LL | pub const PUB_FOO: u64 = 1;
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
#![feature(no_debug)]
|
#![feature(no_debug)]
|
||||||
|
|
||||||
#[no_mangle] const DISCOVERY: usize = 1;
|
#[no_mangle] const DISCOVERY: usize = 1;
|
||||||
//~^ ERROR const items should never be #[no_mangle]
|
//~^ ERROR const items should never be `#[no_mangle]`
|
||||||
//~| HELP try a static value
|
//~| HELP try a static value
|
||||||
|
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
|
@ -20,7 +20,7 @@ mod badlands {
|
||||||
// item is already `pub` (but triggered the lint because, e.g., it's in a
|
// item is already `pub` (but triggered the lint because, e.g., it's in a
|
||||||
// private module). (Issue #47383)
|
// private module). (Issue #47383)
|
||||||
#[no_mangle] pub const DAUNTLESS: bool = true;
|
#[no_mangle] pub const DAUNTLESS: bool = true;
|
||||||
//~^ ERROR const items should never be #[no_mangle]
|
//~^ ERROR const items should never be `#[no_mangle]`
|
||||||
//~| HELP try a static value
|
//~| HELP try a static value
|
||||||
#[no_mangle] pub fn val_jean<T>() {}
|
#[no_mangle] pub fn val_jean<T>() {}
|
||||||
//~^ WARN functions generic over types or consts must be mangled
|
//~^ WARN functions generic over types or consts must be mangled
|
||||||
|
@ -28,7 +28,7 @@ mod badlands {
|
||||||
|
|
||||||
// ... but we can suggest just-`pub` instead of restricted
|
// ... but we can suggest just-`pub` instead of restricted
|
||||||
#[no_mangle] pub(crate) const VETAR: bool = true;
|
#[no_mangle] pub(crate) const VETAR: bool = true;
|
||||||
//~^ ERROR const items should never be #[no_mangle]
|
//~^ ERROR const items should never be `#[no_mangle]`
|
||||||
//~| HELP try a static value
|
//~| HELP try a static value
|
||||||
#[no_mangle] pub(crate) fn crossfield<T>() {}
|
#[no_mangle] pub(crate) fn crossfield<T>() {}
|
||||||
//~^ WARN functions generic over types or consts must be mangled
|
//~^ WARN functions generic over types or consts must be mangled
|
||||||
|
|
|
@ -52,7 +52,7 @@ LL | || b = 1;
|
||||||
| |____________|
|
| |____________|
|
||||||
| help: remove this `mut`
|
| help: remove this `mut`
|
||||||
|
|
||||||
error: const items should never be #[no_mangle]
|
error: const items should never be `#[no_mangle]`
|
||||||
--> $DIR/suggestions.rs:6:14
|
--> $DIR/suggestions.rs:6:14
|
||||||
|
|
|
|
||||||
LL | #[no_mangle] const DISCOVERY: usize = 1;
|
LL | #[no_mangle] const DISCOVERY: usize = 1;
|
||||||
|
@ -83,7 +83,7 @@ LL | Equinox { warp_factor: warp_factor } => {}
|
||||||
|
|
|
|
||||||
= note: `#[warn(non_shorthand_field_patterns)]` on by default
|
= note: `#[warn(non_shorthand_field_patterns)]` on by default
|
||||||
|
|
||||||
error: const items should never be #[no_mangle]
|
error: const items should never be `#[no_mangle]`
|
||||||
--> $DIR/suggestions.rs:22:18
|
--> $DIR/suggestions.rs:22:18
|
||||||
|
|
|
|
||||||
LL | #[no_mangle] pub const DAUNTLESS: bool = true;
|
LL | #[no_mangle] pub const DAUNTLESS: bool = true;
|
||||||
|
@ -99,7 +99,7 @@ LL | #[no_mangle] pub fn val_jean<T>() {}
|
||||||
| |
|
| |
|
||||||
| help: remove this attribute
|
| help: remove this attribute
|
||||||
|
|
||||||
error: const items should never be #[no_mangle]
|
error: const items should never be `#[no_mangle]`
|
||||||
--> $DIR/suggestions.rs:30:18
|
--> $DIR/suggestions.rs:30:18
|
||||||
|
|
|
|
||||||
LL | #[no_mangle] pub(crate) const VETAR: bool = true;
|
LL | #[no_mangle] pub(crate) const VETAR: bool = true;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
error: no global memory allocator found but one is required; link to std or add #[global_allocator] to a static item that implements the GlobalAlloc trait.
|
error: no global memory allocator found but one is required; link to std or add `#[global_allocator]` to a static item that implements the GlobalAlloc trait.
|
||||||
|
|
||||||
error: aborting due to previous error
|
error: aborting due to previous error
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
error: type does not implement `fmt::Debug`; consider adding #[derive(Debug)] or a manual implementation
|
error: type does not implement `fmt::Debug`; consider adding `#[derive(Debug)]` or a manual implementation
|
||||||
--> $DIR/missing_debug_impls.rs:7:1
|
--> $DIR/missing_debug_impls.rs:7:1
|
||||||
|
|
|
|
||||||
LL | pub enum A {}
|
LL | pub enum A {}
|
||||||
|
@ -10,7 +10,7 @@ note: lint level defined here
|
||||||
LL | #![deny(missing_debug_implementations)]
|
LL | #![deny(missing_debug_implementations)]
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
error: type does not implement `fmt::Debug`; consider adding #[derive(Debug)] or a manual implementation
|
error: type does not implement `fmt::Debug`; consider adding `#[derive(Debug)]` or a manual implementation
|
||||||
--> $DIR/missing_debug_impls.rs:20:1
|
--> $DIR/missing_debug_impls.rs:20:1
|
||||||
|
|
|
|
||||||
LL | pub struct Foo;
|
LL | pub struct Foo;
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
// Issue #62863
|
||||||
|
// ignore-tidy-cr
|
||||||
|
|
||||||
|
// Note: if you see ^M in this file, that's how your editor renders literal `\r`
|
||||||
|
|
||||||
|
/// This do
c comment contains
three isolated `\r`
symbols
|
||||||
|
//~^ ERROR bare CR not allowed in doc-comment
|
||||||
|
//~| ERROR bare CR not allowed in doc-comment
|
||||||
|
//~| ERROR bare CR not allowed in doc-comment
|
||||||
|
fn main() {}
|
|
@ -0,0 +1,20 @@
|
||||||
|
error: bare CR not allowed in doc-comment
|
||||||
|
--> $DIR/several-carriage-returns-in-doc-comment.rs:6:12
|
||||||
|
|
|
||||||
|
LL | /// This do
c comment contains
three isolated `\r`
symbols
|
||||||
|
| ^
|
||||||
|
|
||||||
|
error: bare CR not allowed in doc-comment
|
||||||
|
--> $DIR/several-carriage-returns-in-doc-comment.rs:6:32
|
||||||
|
|
|
||||||
|
LL | /// This do
c comment contains
three isolated `\r`
symbols
|
||||||
|
| ^
|
||||||
|
|
||||||
|
error: bare CR not allowed in doc-comment
|
||||||
|
--> $DIR/several-carriage-returns-in-doc-comment.rs:6:52
|
||||||
|
|
|
||||||
|
LL | /// This do
c comment contains
three isolated `\r`
symbols
|
||||||
|
| ^
|
||||||
|
|
||||||
|
error: aborting due to 3 previous errors
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
error: renaming of the library `foo` was specified, however this crate contains no #[link(...)] attributes referencing this library.
|
error: renaming of the library `foo` was specified, however this crate contains no `#[link(...)]` attributes referencing this library.
|
||||||
|
|
||||||
error: aborting due to previous error
|
error: aborting due to previous error
|
||||||
|
|
||||||
|
|
|
@ -1,16 +1,16 @@
|
||||||
error: must be of the form #[link(wasm_import_module = "...")]
|
error: must be of the form `#[link(wasm_import_module = "...")]`
|
||||||
--> $DIR/wasm-import-module.rs:1:22
|
--> $DIR/wasm-import-module.rs:1:22
|
||||||
|
|
|
|
||||||
LL | #[link(name = "...", wasm_import_module)]
|
LL | #[link(name = "...", wasm_import_module)]
|
||||||
| ^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
error: must be of the form #[link(wasm_import_module = "...")]
|
error: must be of the form `#[link(wasm_import_module = "...")]`
|
||||||
--> $DIR/wasm-import-module.rs:4:22
|
--> $DIR/wasm-import-module.rs:4:22
|
||||||
|
|
|
|
||||||
LL | #[link(name = "...", wasm_import_module(x))]
|
LL | #[link(name = "...", wasm_import_module(x))]
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
error: must be of the form #[link(wasm_import_module = "...")]
|
error: must be of the form `#[link(wasm_import_module = "...")]`
|
||||||
--> $DIR/wasm-import-module.rs:7:22
|
--> $DIR/wasm-import-module.rs:7:22
|
||||||
|
|
|
|
||||||
LL | #[link(name = "...", wasm_import_module())]
|
LL | #[link(name = "...", wasm_import_module())]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue