mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 15:23:46 +00:00
Auto merge of #62782 - Mark-Simulacrum:rollup-1hz5ya6, r=Mark-Simulacrum
Rollup of 15 pull requests Successful merges: - #61926 (Fix hyperlinks in From impls between Vec and VecDeque) - #62615 ( Only error about MSVC + PGO + unwind if we're generating code) - #62696 (Check that trait is exported or public before adding hint) - #62712 (Update the help message on error for self type) - #62728 (Fix repeated wording in slice documentation) - #62730 (Consolidate hygiene tests) - #62732 (Remove last use of mem::uninitialized from std::io::util) - #62740 (Add missing link to Infallible in TryFrom doc) - #62745 (update data_layout and features for armv7-wrs-vxworks) - #62749 (Document link_section arbitrary bytes) - #62752 (Disable Z3 in LLVM build) - #62764 (normalize use of backticks in compiler messages for librustc/lint) - #62774 (Disable simd_select_bitmask test on big endian) - #62777 (Self-referencial type now called a recursive type) - #62778 (Emit artifact notifications for dependency files) Failed merges: - #62746 ( do not use mem::uninitialized in std::io) r? @ghost
This commit is contained in:
commit
311376d30d
@ -150,6 +150,7 @@ impl Step for Llvm {
|
||||
.define("WITH_POLLY", "OFF")
|
||||
.define("LLVM_ENABLE_TERMINFO", "OFF")
|
||||
.define("LLVM_ENABLE_LIBEDIT", "OFF")
|
||||
.define("LLVM_ENABLE_Z3_SOLVER", "OFF")
|
||||
.define("LLVM_PARALLEL_COMPILE_JOBS", builder.jobs().to_string())
|
||||
.define("LLVM_TARGET_ARCH", target.split('-').next().unwrap())
|
||||
.define("LLVM_DEFAULT_TARGET_TRIPLE", target);
|
||||
|
@ -2721,6 +2721,9 @@ impl<T: fmt::Debug> fmt::Debug for VecDeque<T> {
|
||||
impl<T> From<Vec<T>> for VecDeque<T> {
|
||||
/// Turn a [`Vec<T>`] into a [`VecDeque<T>`].
|
||||
///
|
||||
/// [`Vec<T>`]: crate::vec::Vec
|
||||
/// [`VecDeque<T>`]: crate::collections::VecDeque
|
||||
///
|
||||
/// This avoids reallocating where possible, but the conditions for that are
|
||||
/// strict, and subject to change, and so shouldn't be relied upon unless the
|
||||
/// `Vec<T>` came from `From<VecDeque<T>>` and hasn't been reallocated.
|
||||
@ -2752,6 +2755,9 @@ impl<T> From<Vec<T>> for VecDeque<T> {
|
||||
impl<T> From<VecDeque<T>> for Vec<T> {
|
||||
/// Turn a [`VecDeque<T>`] into a [`Vec<T>`].
|
||||
///
|
||||
/// [`Vec<T>`]: crate::vec::Vec
|
||||
/// [`VecDeque<T>`]: crate::collections::VecDeque
|
||||
///
|
||||
/// This never needs to re-allocate, but does need to do O(n) data movement if
|
||||
/// the circular buffer doesn't happen to be at the beginning of the allocation.
|
||||
///
|
||||
|
@ -477,6 +477,7 @@ pub trait TryInto<T>: Sized {
|
||||
/// [`TryInto`]: trait.TryInto.html
|
||||
/// [`i32::MAX`]: ../../std/i32/constant.MAX.html
|
||||
/// [`!`]: ../../std/primitive.never.html
|
||||
/// [`Infallible`]: enum.Infallible.html
|
||||
#[stable(feature = "try_from", since = "1.34.0")]
|
||||
pub trait TryFrom<T>: Sized {
|
||||
/// The type returned in the event of a conversion error.
|
||||
|
@ -611,7 +611,7 @@ impl<T> [T] {
|
||||
///
|
||||
/// See [`chunks_exact`] for a variant of this iterator that returns chunks of always exactly
|
||||
/// `chunk_size` elements, and [`rchunks`] for the same iterator but starting at the end of the
|
||||
/// slice of the slice.
|
||||
/// slice.
|
||||
///
|
||||
/// # Panics
|
||||
///
|
||||
@ -645,7 +645,7 @@ impl<T> [T] {
|
||||
///
|
||||
/// See [`chunks_exact_mut`] for a variant of this iterator that returns chunks of always
|
||||
/// exactly `chunk_size` elements, and [`rchunks_mut`] for the same iterator but starting at
|
||||
/// the end of the slice of the slice.
|
||||
/// the end of the slice.
|
||||
///
|
||||
/// # Panics
|
||||
///
|
||||
@ -727,7 +727,7 @@ impl<T> [T] {
|
||||
///
|
||||
/// See [`chunks_mut`] for a variant of this iterator that also returns the remainder as a
|
||||
/// smaller chunk, and [`rchunks_exact_mut`] for the same iterator but starting at the end of
|
||||
/// the slice of the slice.
|
||||
/// the slice.
|
||||
///
|
||||
/// # Panics
|
||||
///
|
||||
|
@ -94,19 +94,19 @@ declare_lint! {
|
||||
declare_lint! {
|
||||
pub UNUSED_FEATURES,
|
||||
Warn,
|
||||
"unused features found in crate-level #[feature] directives"
|
||||
"unused features found in crate-level `#[feature]` directives"
|
||||
}
|
||||
|
||||
declare_lint! {
|
||||
pub STABLE_FEATURES,
|
||||
Warn,
|
||||
"stable features found in #[feature] directive"
|
||||
"stable features found in `#[feature]` directive"
|
||||
}
|
||||
|
||||
declare_lint! {
|
||||
pub UNKNOWN_CRATE_TYPES,
|
||||
Deny,
|
||||
"unknown crate type found in #[crate_type] directive"
|
||||
"unknown crate type found in `#[crate_type]` directive"
|
||||
}
|
||||
|
||||
declare_lint! {
|
||||
|
@ -671,7 +671,7 @@ pub fn struct_lint_level<'a>(sess: &'a Session,
|
||||
sess.diag_note_once(
|
||||
&mut err,
|
||||
DiagnosticMessageId::from(lint),
|
||||
&format!("#[{}({})] on by default", level.as_str(), name));
|
||||
&format!("`#[{}({})]` on by default", level.as_str(), name));
|
||||
}
|
||||
LintSource::CommandLine(lint_flag_val) => {
|
||||
let flag = match level {
|
||||
@ -706,7 +706,7 @@ pub fn struct_lint_level<'a>(sess: &'a Session,
|
||||
if lint_attr_name.as_str() != name {
|
||||
let level_str = level.as_str();
|
||||
sess.diag_note_once(&mut err, DiagnosticMessageId::from(lint),
|
||||
&format!("#[{}({})] implied by #[{}({})]",
|
||||
&format!("`#[{}({})]` implied by `#[{}({})]`",
|
||||
level_str, name, level_str, lint_attr_name));
|
||||
}
|
||||
}
|
||||
|
@ -9,7 +9,7 @@ use crate::lint;
|
||||
use crate::lint::builtin::BuiltinLintDiagnostics;
|
||||
use crate::middle::allocator::AllocatorKind;
|
||||
use crate::middle::dependency_format;
|
||||
use crate::session::config::{OutputType, SwitchWithOptPath};
|
||||
use crate::session::config::{OutputType, PrintRequest, SwitchWithOptPath};
|
||||
use crate::session::search_paths::{PathKind, SearchPath};
|
||||
use crate::util::nodemap::{FxHashMap, FxHashSet};
|
||||
use crate::util::common::{duration_to_secs_str, ErrorReported};
|
||||
@ -1303,15 +1303,18 @@ fn validate_commandline_args_with_session_available(sess: &Session) {
|
||||
}
|
||||
|
||||
// PGO does not work reliably with panic=unwind on Windows. Let's make it
|
||||
// a warning to combine the two for now. It always runs into an assertions
|
||||
// an error to combine the two for now. It always runs into an assertions
|
||||
// if LLVM is built with assertions, but without assertions it sometimes
|
||||
// does not crash and will probably generate a corrupted binary.
|
||||
// We should only display this error if we're actually going to run PGO.
|
||||
// If we're just supposed to print out some data, don't show the error (#61002).
|
||||
if sess.opts.cg.profile_generate.enabled() &&
|
||||
sess.target.target.options.is_like_msvc &&
|
||||
sess.panic_strategy() == PanicStrategy::Unwind {
|
||||
sess.warn("Profile-guided optimization does not yet work in conjunction \
|
||||
with `-Cpanic=unwind` on Windows when targeting MSVC. \
|
||||
See https://github.com/rust-lang/rust/issues/61002 for details.");
|
||||
sess.panic_strategy() == PanicStrategy::Unwind &&
|
||||
sess.opts.prints.iter().all(|&p| p == PrintRequest::NativeStaticLibs) {
|
||||
sess.err("Profile-guided optimization does not yet work in conjunction \
|
||||
with `-Cpanic=unwind` on Windows when targeting MSVC. \
|
||||
See https://github.com/rust-lang/rust/issues/61002 for details.");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -366,8 +366,13 @@ pub(super) fn specialization_graph_provider(
|
||||
}
|
||||
}
|
||||
|
||||
for cause in &overlap.intercrate_ambiguity_causes {
|
||||
cause.add_intercrate_ambiguity_hint(&mut err);
|
||||
let access_levels = tcx.privacy_access_levels(impl_def_id.krate);
|
||||
if let Some(id) = tcx.hir().as_local_hir_id(impl_def_id) {
|
||||
if access_levels.is_exported(id) || access_levels.is_public(id) {
|
||||
for cause in &overlap.intercrate_ambiguity_causes {
|
||||
cause.add_intercrate_ambiguity_hint(&mut err);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if overlap.involves_placeholder {
|
||||
|
@ -688,12 +688,20 @@ fn write_out_deps(sess: &Session, outputs: &OutputFilenames, out_filenames: &[Pa
|
||||
Ok(())
|
||||
})();
|
||||
|
||||
if let Err(e) = result {
|
||||
sess.fatal(&format!(
|
||||
"error writing dependencies to `{}`: {}",
|
||||
deps_filename.display(),
|
||||
e
|
||||
));
|
||||
match result {
|
||||
Ok(_) => {
|
||||
if sess.opts.debugging_opts.emit_artifact_notifications {
|
||||
sess.parse_sess.span_diagnostic
|
||||
.emit_artifact_notification(&deps_filename, "dep-info");
|
||||
}
|
||||
},
|
||||
Err(e) => {
|
||||
sess.fatal(&format!(
|
||||
"error writing dependencies to `{}`: {}",
|
||||
deps_filename.display(),
|
||||
e
|
||||
))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -10,7 +10,7 @@ pub fn target() -> TargetResult {
|
||||
target_endian: "little".to_string(),
|
||||
target_pointer_width: "32".to_string(),
|
||||
target_c_int_width: "32".to_string(),
|
||||
data_layout: "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64".to_string(),
|
||||
data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(),
|
||||
arch: "arm".to_string(),
|
||||
target_os: "vxworks".to_string(),
|
||||
target_env: "gnu".to_string(),
|
||||
@ -19,12 +19,11 @@ pub fn target() -> TargetResult {
|
||||
|
||||
options: TargetOptions {
|
||||
// Info about features at https://wiki.debian.org/ArmHardFloatPort
|
||||
features: "+v7,+vfp3,+d16,+thumb2,-neon".to_string(),
|
||||
features: "+v7,+vfp3,-d32,+thumb2,-neon".to_string(),
|
||||
cpu: "generic".to_string(),
|
||||
max_atomic_width: Some(64),
|
||||
abi_blacklist: super::arm_base::abi_blacklist(),
|
||||
target_mcount: "\u{1}__gnu_mcount_nc".to_string(),
|
||||
// tls_model: "local-exec".to_string(),
|
||||
position_independent_executables: false,
|
||||
.. base
|
||||
}
|
||||
|
@ -10,7 +10,7 @@ pub fn target() -> TargetResult {
|
||||
target_endian: "little".to_string(),
|
||||
target_pointer_width: "32".to_string(),
|
||||
target_c_int_width: "32".to_string(),
|
||||
data_layout: "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64".to_string(),
|
||||
data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(),
|
||||
arch: "arm".to_string(),
|
||||
target_os: "vxworks".to_string(),
|
||||
target_env: "gnu".to_string(),
|
||||
@ -19,12 +19,11 @@ pub fn target() -> TargetResult {
|
||||
|
||||
options: TargetOptions {
|
||||
// Info about features at https://wiki.debian.org/ArmHardFloatPort
|
||||
features: "+v7,+vfp3,+d16,+thumb2,-neon".to_string(),
|
||||
features: "+v7,+vfp3,-d32,+thumb2,-neon".to_string(),
|
||||
cpu: "generic".to_string(),
|
||||
max_atomic_width: Some(64),
|
||||
abi_blacklist: super::arm_base::abi_blacklist(),
|
||||
target_mcount: "\u{1}__gnu_mcount_nc".to_string(),
|
||||
// tls_model: "local-exec".to_string(),
|
||||
position_independent_executables: false,
|
||||
.. base
|
||||
}
|
||||
|
@ -1321,7 +1321,7 @@ fn check_opaque<'tcx>(tcx: TyCtxt<'tcx>, def_id: DefId, substs: SubstsRef<'tcx>,
|
||||
tcx.sess, span, E0720,
|
||||
"opaque type expands to a recursive type",
|
||||
);
|
||||
err.span_label(span, "expands to self-referential type");
|
||||
err.span_label(span, "expands to a recursive type");
|
||||
if let ty::Opaque(..) = partially_expanded_type.sty {
|
||||
err.note("type resolves to itself");
|
||||
} else {
|
||||
@ -1442,11 +1442,14 @@ fn maybe_check_static_with_link_section(tcx: TyCtxt<'_>, id: DefId, span: Span)
|
||||
return
|
||||
}
|
||||
|
||||
// For the wasm32 target statics with #[link_section] are placed into custom
|
||||
// For the wasm32 target statics with `#[link_section]` are placed into custom
|
||||
// sections of the final output file, but this isn't link custom sections of
|
||||
// other executable formats. Namely we can only embed a list of bytes,
|
||||
// nothing with pointers to anything else or relocations. If any relocation
|
||||
// show up, reject them here.
|
||||
// `#[link_section]` may contain arbitrary, or even undefined bytes, but it is
|
||||
// the consumer's responsibility to ensure all bytes that have been read
|
||||
// have defined values.
|
||||
let instance = ty::Instance::mono(tcx, id);
|
||||
let cid = GlobalId {
|
||||
instance,
|
||||
|
@ -769,6 +769,10 @@ fn check_method_receiver<'fcx, 'tcx>(
|
||||
method: &ty::AssocItem,
|
||||
self_ty: Ty<'tcx>,
|
||||
) {
|
||||
const HELP_FOR_SELF_TYPE: &str =
|
||||
"consider changing to `self`, `&self`, `&mut self`, `self: Box<Self>`, \
|
||||
`self: Rc<Self>`, `self: Arc<Self>`, or `self: Pin<P>` (where P is one \
|
||||
of the previous types except `Self`)";
|
||||
// Check that the method has a valid receiver type, given the type `Self`.
|
||||
debug!("check_method_receiver({:?}, self_ty={:?})",
|
||||
method, self_ty);
|
||||
@ -805,7 +809,7 @@ fn check_method_receiver<'fcx, 'tcx>(
|
||||
fcx.tcx.sess.diagnostic().mut_span_err(
|
||||
span, &format!("invalid method receiver type: {:?}", receiver_ty)
|
||||
).note("type of `self` must be `Self` or a type that dereferences to it")
|
||||
.help("consider changing to `self`, `&self`, `&mut self`, or `self: Box<Self>`")
|
||||
.help(HELP_FOR_SELF_TYPE)
|
||||
.code(DiagnosticId::Error("E0307".into()))
|
||||
.emit();
|
||||
}
|
||||
@ -823,14 +827,14 @@ fn check_method_receiver<'fcx, 'tcx>(
|
||||
the `arbitrary_self_types` feature",
|
||||
receiver_ty,
|
||||
),
|
||||
).help("consider changing to `self`, `&self`, `&mut self`, or `self: Box<Self>`")
|
||||
).help(HELP_FOR_SELF_TYPE)
|
||||
.emit();
|
||||
} else {
|
||||
// Report error; would not have worked with `arbitrary_self_types`.
|
||||
fcx.tcx.sess.diagnostic().mut_span_err(
|
||||
span, &format!("invalid method receiver type: {:?}", receiver_ty)
|
||||
).note("type must be `Self` or a type that dereferences to it")
|
||||
.help("consider changing to `self`, `&self`, `&mut self`, or `self: Box<Self>`")
|
||||
.help(HELP_FOR_SELF_TYPE)
|
||||
.code(DiagnosticId::Error("E0307".into()))
|
||||
.emit();
|
||||
}
|
||||
|
@ -44,10 +44,15 @@ pub fn copy<R: ?Sized, W: ?Sized>(reader: &mut R, writer: &mut W) -> io::Result<
|
||||
where R: Read, W: Write
|
||||
{
|
||||
let mut buf = unsafe {
|
||||
#[allow(deprecated)]
|
||||
let mut buf: [u8; super::DEFAULT_BUF_SIZE] = mem::uninitialized();
|
||||
reader.initializer().initialize(&mut buf);
|
||||
buf
|
||||
// This is still technically undefined behavior due to creating a reference
|
||||
// to uninitialized data, but within libstd we can rely on more guarantees
|
||||
// than if this code were in an external lib
|
||||
|
||||
// FIXME: This should probably be changed to an array of `MaybeUninit<u8>`
|
||||
// once the `mem::MaybeUninit` slice APIs stabilize
|
||||
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;
|
||||
|
@ -1,21 +0,0 @@
|
||||
-include ../tools.mk
|
||||
|
||||
REPLACEMENT := s/[0-9][0-9]*\#[0-9][0-9]*/$(shell date)/g
|
||||
|
||||
all:
|
||||
$(RUSTC) -o $(TMPDIR)/input.out -Z unstable-options \
|
||||
--pretty expanded,hygiene input.rs
|
||||
|
||||
# the name/ctxt numbers are very internals-dependent and thus
|
||||
# change relatively frequently, and testing for their exact values
|
||||
# them will fail annoyingly, so we just check their positions
|
||||
# (using a non-constant replacement like this will make it less
|
||||
# likely the compiler matches whatever other dummy value we
|
||||
# choose).
|
||||
#
|
||||
# (These need to be out-of-place because OSX/BSD & GNU sed
|
||||
# differ.)
|
||||
sed "$(REPLACEMENT)" input.pp.rs > $(TMPDIR)/input.pp.rs
|
||||
sed "$(REPLACEMENT)" $(TMPDIR)/input.out > $(TMPDIR)/input.out.replaced
|
||||
|
||||
diff -u $(TMPDIR)/input.out.replaced $(TMPDIR)/input.pp.rs
|
@ -4,5 +4,5 @@ warning: the feature `extern_prelude` has been stable since 1.30.0 and no longer
|
||||
LL | #![feature(extern_prelude, lang_items, start)]
|
||||
| ^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: #[warn(stable_features)] on by default
|
||||
= note: `#[warn(stable_features)]` on by default
|
||||
|
||||
|
@ -4,5 +4,5 @@ warning: the feature `extern_prelude` has been stable since 1.30.0 and no longer
|
||||
LL | #![feature(extern_prelude)]
|
||||
| ^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: #[warn(stable_features)] on by default
|
||||
= note: `#[warn(stable_features)]` on by default
|
||||
|
||||
|
@ -4,5 +4,5 @@ warning: unreachable block in `if` expression
|
||||
LL | fn foo() { if (return) { } }
|
||||
| ^^^
|
||||
|
|
||||
= note: #[warn(unreachable_code)] on by default
|
||||
= note: `#[warn(unreachable_code)]` on by default
|
||||
|
||||
|
@ -4,5 +4,5 @@ warning: unused attribute
|
||||
LL | #[macro_use()]
|
||||
| ^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: #[warn(unused_attributes)] on by default
|
||||
= note: `#[warn(unused_attributes)]` on by default
|
||||
|
||||
|
@ -4,5 +4,5 @@ warning: the feature `crate_in_paths` has been stable since 1.30.0 and no longer
|
||||
LL | #![feature(crate_in_paths)]
|
||||
| ^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: #[warn(stable_features)] on by default
|
||||
= note: `#[warn(stable_features)]` on by default
|
||||
|
||||
|
@ -4,5 +4,5 @@ warning: the feature `crate_in_paths` has been stable since 1.30.0 and no longer
|
||||
LL | #![feature(crate_in_paths)]
|
||||
| ^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: #[warn(stable_features)] on by default
|
||||
= note: `#[warn(stable_features)]` on by default
|
||||
|
||||
|
@ -2,6 +2,10 @@
|
||||
#![allow(non_camel_case_types)]
|
||||
|
||||
// ignore-emscripten
|
||||
// ignore-mips behavior of simd_select_bitmask is endian-specific
|
||||
// ignore-mips64 behavior of simd_select_bitmask is endian-specific
|
||||
// ignore-powerpc behavior of simd_select_bitmask is endian-specific
|
||||
// ignore-powerpc64 behavior of simd_select_bitmask is endian-specific
|
||||
|
||||
// Test that the simd_select intrinsics produces correct results.
|
||||
|
||||
|
@ -4,7 +4,7 @@ warning: `[error]` cannot be resolved, ignoring it...
|
||||
LL | /// [error]
|
||||
| ^^^^^ cannot be resolved, ignoring
|
||||
|
|
||||
= note: #[warn(intra_doc_link_resolution_failure)] on by default
|
||||
= note: `#[warn(intra_doc_link_resolution_failure)]` on by default
|
||||
= help: to escape `[` and `]` characters, just add '\' before them like `\[` or `\]`
|
||||
|
||||
warning: `[error1]` cannot be resolved, ignoring it...
|
||||
|
@ -4,7 +4,7 @@ warning: `[Foo::baz]` cannot be resolved, ignoring it...
|
||||
LL | //! Test with [Foo::baz], [Bar::foo], ...
|
||||
| ^^^^^^^^ cannot be resolved, ignoring
|
||||
|
|
||||
= note: #[warn(intra_doc_link_resolution_failure)] on by default
|
||||
= note: `#[warn(intra_doc_link_resolution_failure)]` on by default
|
||||
= help: to escape `[` and `]` characters, just add '\' before them like `\[` or `\]`
|
||||
|
||||
warning: `[Bar::foo]` cannot be resolved, ignoring it...
|
||||
|
@ -13,7 +13,7 @@ note: lint level defined here
|
||||
|
|
||||
LL | #![deny(rustdoc)]
|
||||
| ^^^^^^^
|
||||
= note: #[deny(private_doc_tests)] implied by #[deny(rustdoc)]
|
||||
= note: `#[deny(private_doc_tests)]` implied by `#[deny(rustdoc)]`
|
||||
|
||||
error: `[error]` cannot be resolved, ignoring it...
|
||||
--> $DIR/lint-group.rs:9:29
|
||||
@ -26,7 +26,7 @@ note: lint level defined here
|
||||
|
|
||||
LL | #![deny(rustdoc)]
|
||||
| ^^^^^^^
|
||||
= note: #[deny(intra_doc_link_resolution_failure)] implied by #[deny(rustdoc)]
|
||||
= note: `#[deny(intra_doc_link_resolution_failure)]` implied by `#[deny(rustdoc)]`
|
||||
= help: to escape `[` and `]` characters, just add '\' before them like `\[` or `\]`
|
||||
|
||||
error: Missing code example in this documentation
|
||||
@ -40,7 +40,7 @@ note: lint level defined here
|
||||
|
|
||||
LL | #![deny(rustdoc)]
|
||||
| ^^^^^^^
|
||||
= note: #[deny(missing_doc_code_examples)] implied by #[deny(rustdoc)]
|
||||
= note: `#[deny(missing_doc_code_examples)]` implied by `#[deny(rustdoc)]`
|
||||
|
||||
error: aborting due to 3 previous errors
|
||||
|
||||
|
@ -4,5 +4,5 @@ warning: use of deprecated item 'Encodable': derive(Encodable) is deprecated in
|
||||
LL | #[derive(Encodable)]
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: #[warn(deprecated)] on by default
|
||||
= note: `#[warn(deprecated)]` on by default
|
||||
|
||||
|
@ -4,7 +4,7 @@ warning: item is named 'lintme'
|
||||
LL | fn lintme() { }
|
||||
| ^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: #[warn(test_lint)] on by default
|
||||
= note: `#[warn(test_lint)]` on by default
|
||||
|
||||
warning: item is named 'pleaselintme'
|
||||
--> $DIR/lint-group-plugin.rs:10:1
|
||||
@ -12,5 +12,5 @@ warning: item is named 'pleaselintme'
|
||||
LL | fn pleaselintme() { }
|
||||
| ^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: #[warn(please_lint)] on by default
|
||||
= note: `#[warn(please_lint)]` on by default
|
||||
|
||||
|
@ -9,5 +9,5 @@ note: lint level defined here
|
||||
|
|
||||
LL | #![warn(unused)]
|
||||
| ^^^^^^
|
||||
= note: #[warn(dead_code)] implied by #[warn(unused)]
|
||||
= note: `#[warn(dead_code)]` implied by `#[warn(unused)]`
|
||||
|
||||
|
@ -4,5 +4,5 @@ warning: item is named 'lintme'
|
||||
LL | fn lintme() { }
|
||||
| ^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: #[warn(test_lint)] on by default
|
||||
= note: `#[warn(test_lint)]` on by default
|
||||
|
||||
|
@ -4,5 +4,5 @@ warning: item is named 'lintme'
|
||||
LL | fn lintme() { }
|
||||
| ^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: #[warn(test_lint)] on by default
|
||||
= note: `#[warn(test_lint)]` on by default
|
||||
|
||||
|
@ -8,7 +8,7 @@ warning: item is named 'lintme'
|
||||
LL | fn lintme() {}
|
||||
| ^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: #[warn(clippy::test_lint)] on by default
|
||||
= note: `#[warn(clippy::test_lint)]` on by default
|
||||
|
||||
warning: function is never used: `lintme`
|
||||
--> $DIR/lint-tool-cmdline-allow.rs:10:1
|
||||
@ -21,5 +21,5 @@ note: lint level defined here
|
||||
|
|
||||
LL | #![warn(unused)]
|
||||
| ^^^^^^
|
||||
= note: #[warn(dead_code)] implied by #[warn(unused)]
|
||||
= note: `#[warn(dead_code)]` implied by `#[warn(unused)]`
|
||||
|
||||
|
@ -4,7 +4,7 @@ warning: lint name `test_lint` is deprecated and may not have an effect in the f
|
||||
LL | #![cfg_attr(foo, warn(test_lint))]
|
||||
| ^^^^^^^^^ help: change it to: `clippy::test_lint`
|
||||
|
|
||||
= note: #[warn(renamed_and_removed_lints)] on by default
|
||||
= note: `#[warn(renamed_and_removed_lints)]` on by default
|
||||
|
||||
warning: lint name `clippy_group` is deprecated and may not have an effect in the future. Also `cfg_attr(cargo-clippy)` won't be necessary anymore
|
||||
--> $DIR/lint-tool-test.rs:11:9
|
||||
@ -24,7 +24,7 @@ warning: unknown lint: `this_lint_does_not_exist`
|
||||
LL | #[deny(this_lint_does_not_exist)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: #[warn(unknown_lints)] on by default
|
||||
= note: `#[warn(unknown_lints)]` on by default
|
||||
|
||||
warning: lint name `test_lint` is deprecated and may not have an effect in the future. Also `cfg_attr(cargo-clippy)` won't be necessary anymore
|
||||
--> $DIR/lint-tool-test.rs:8:23
|
||||
@ -43,7 +43,7 @@ note: lint level defined here
|
||||
|
|
||||
LL | #![deny(clippy_group)]
|
||||
| ^^^^^^^^^^^^
|
||||
= note: #[deny(clippy::test_lint)] implied by #[deny(clippy::group)]
|
||||
= note: `#[deny(clippy::test_lint)]` implied by `#[deny(clippy::group)]`
|
||||
|
||||
error: item is named 'lintmetoo'
|
||||
--> $DIR/lint-tool-test.rs:22:5
|
||||
@ -56,7 +56,7 @@ note: lint level defined here
|
||||
|
|
||||
LL | #![deny(clippy_group)]
|
||||
| ^^^^^^^^^^^^
|
||||
= note: #[deny(clippy::test_group)] implied by #[deny(clippy::group)]
|
||||
= note: `#[deny(clippy::test_group)]` implied by `#[deny(clippy::group)]`
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
|
@ -6,7 +6,7 @@ LL | const B: i32 = (&A)[1];
|
||||
| |
|
||||
| index out of bounds: the len is 0 but the index is 1
|
||||
|
|
||||
= note: #[deny(const_err)] on by default
|
||||
= note: `#[deny(const_err)]` on by default
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
@ -6,7 +6,7 @@ LL | const B: i32 = A[1];
|
||||
| |
|
||||
| index out of bounds: the len is 0 but the index is 1
|
||||
|
|
||||
= note: #[deny(const_err)] on by default
|
||||
= note: `#[deny(const_err)]` on by default
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
@ -4,7 +4,7 @@ warning: where clauses are not enforced in type aliases
|
||||
LL | type _TaWhere1<T> where T: Iterator<Item: Copy> = T;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: #[warn(type_alias_bounds)] on by default
|
||||
= note: `#[warn(type_alias_bounds)]` on by default
|
||||
= help: the clause will not be checked when the type alias is used, and should be removed
|
||||
|
||||
warning: where clauses are not enforced in type aliases
|
||||
|
@ -2,7 +2,7 @@ error[E0720]: opaque type expands to a recursive type
|
||||
--> $DIR/recursive-async-impl-trait-type.rs:7:40
|
||||
|
|
||||
LL | async fn recursive_async_function() -> () {
|
||||
| ^^ expands to self-referential type
|
||||
| ^^ expands to a recursive type
|
||||
|
|
||||
= note: expanded type is `std::future::GenFuture<[static generator@$DIR/recursive-async-impl-trait-type.rs:7:43: 9:2 {impl std::future::Future, ()}]>`
|
||||
|
||||
|
@ -9,7 +9,7 @@ note: lint level defined here
|
||||
|
|
||||
LL | #![deny(warnings)]
|
||||
| ^^^^^^^^
|
||||
= note: #[deny(unused_imports)] implied by #[deny(warnings)]
|
||||
= note: `#[deny(unused_imports)]` implied by `#[deny(warnings)]`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
@ -9,5 +9,5 @@ note: lint level defined here
|
||||
|
|
||||
LL | #![deny(warnings)]
|
||||
| ^^^^^^^^
|
||||
= note: #[warn(unused_imports)] implied by #[warn(warnings)]
|
||||
= note: `#[warn(unused_imports)]` implied by `#[warn(warnings)]`
|
||||
|
||||
|
@ -4,7 +4,7 @@ warning: denote infinite loops with `loop { ... }`
|
||||
LL | while true {
|
||||
| ^^^^^^^^^^ help: use `loop`
|
||||
|
|
||||
= note: #[warn(while_true)] on by default
|
||||
= note: `#[warn(while_true)]` on by default
|
||||
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/block-must-not-have-result-while.rs:3:9
|
||||
|
@ -4,7 +4,7 @@ warning: denote infinite loops with `loop { ... }`
|
||||
LL | while true {
|
||||
| ^^^^^^^^^^ help: use `loop`
|
||||
|
|
||||
= note: #[warn(while_true)] on by default
|
||||
= note: `#[warn(while_true)]` on by default
|
||||
|
||||
error[E0499]: cannot borrow `*arg` as mutable more than once at a time
|
||||
--> $DIR/mut-borrow-in-loop.rs:10:25
|
||||
|
@ -31,7 +31,7 @@ LL | v.push(shared.len());
|
||||
| |
|
||||
| mutable borrow occurs here
|
||||
|
|
||||
= note: #[warn(mutable_borrow_reservation_conflict)] on by default
|
||||
= note: `#[warn(mutable_borrow_reservation_conflict)]` on by default
|
||||
= warning: this borrowing pattern was not meant to be accepted, and may become a hard error in the future
|
||||
= note: for more information, see issue #59159 <https://github.com/rust-lang/rust/issues/59159>
|
||||
|
||||
|
@ -31,7 +31,7 @@ LL | v.push(shared.len());
|
||||
| |
|
||||
| mutable borrow occurs here
|
||||
|
|
||||
= note: #[warn(mutable_borrow_reservation_conflict)] on by default
|
||||
= note: `#[warn(mutable_borrow_reservation_conflict)]` on by default
|
||||
= warning: this borrowing pattern was not meant to be accepted, and may become a hard error in the future
|
||||
= note: for more information, see issue #59159 <https://github.com/rust-lang/rust/issues/59159>
|
||||
|
||||
|
@ -4,5 +4,5 @@ warning: denote infinite loops with `loop { ... }`
|
||||
LL | let s = "ZͨA͑ͦ͒͋ͤ͑̚L̄͑͋Ĝͨͥ̿͒̽̈́Oͥ͛ͭ!̏"; while true { break; }
|
||||
| ^^^^^^^^^^ help: use `loop`
|
||||
|
|
||||
= note: #[warn(while_true)] on by default
|
||||
= note: `#[warn(while_true)]` on by default
|
||||
|
||||
|
@ -5,8 +5,6 @@ LL | impl<T> Foo for T where T: Remote {}
|
||||
| --------------------------------- first implementation here
|
||||
LL | impl Foo for i16 {}
|
||||
| ^^^^^^^^^^^^^^^^ conflicting implementation for `i16`
|
||||
|
|
||||
= note: upstream crates may add new impl of trait `coherence_lib::Remote` for type `i16` in future versions
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
@ -5,8 +5,6 @@ LL | impl<T> Foo for T where T: Remote {}
|
||||
| --------------------------------- first implementation here
|
||||
LL | impl Foo for i16 {}
|
||||
| ^^^^^^^^^^^^^^^^ conflicting implementation for `i16`
|
||||
|
|
||||
= note: upstream crates may add new impl of trait `coherence_lib::Remote` for type `i16` in future versions
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
@ -6,8 +6,6 @@ LL | impl<T: lib::MyCopy> MyTrait for T { }
|
||||
...
|
||||
LL | impl MyTrait for lib::MyFundamentalStruct<(MyType,)> { }
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `lib::MyFundamentalStruct<(MyType,)>`
|
||||
|
|
||||
= note: upstream crates may add new impl of trait `lib::MyCopy` for type `lib::MyFundamentalStruct<(MyType,)>` in future versions
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
@ -6,8 +6,6 @@ LL | impl<T: lib::MyCopy> MyTrait for T { }
|
||||
...
|
||||
LL | impl MyTrait for lib::MyFundamentalStruct<(MyType,)> { }
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `lib::MyFundamentalStruct<(MyType,)>`
|
||||
|
|
||||
= note: upstream crates may add new impl of trait `lib::MyCopy` for type `lib::MyFundamentalStruct<(MyType,)>` in future versions
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
@ -6,8 +6,6 @@ LL | impl<T: lib::MyCopy> MyTrait for T { }
|
||||
...
|
||||
LL | impl MyTrait for lib::MyStruct<MyType> { }
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `lib::MyStruct<MyType>`
|
||||
|
|
||||
= note: upstream crates may add new impl of trait `lib::MyCopy` for type `lib::MyStruct<MyType>` in future versions
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
@ -6,8 +6,6 @@ LL | impl<T: lib::MyCopy> MyTrait for T { }
|
||||
...
|
||||
LL | impl MyTrait for lib::MyStruct<MyType> { }
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `lib::MyStruct<MyType>`
|
||||
|
|
||||
= note: upstream crates may add new impl of trait `lib::MyCopy` for type `lib::MyStruct<MyType>` in future versions
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
@ -6,8 +6,6 @@ LL | impl<T: lib::MyCopy> MyTrait for T { }
|
||||
...
|
||||
LL | impl MyTrait for (MyType,) { }
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `(MyType,)`
|
||||
|
|
||||
= note: upstream crates may add new impl of trait `lib::MyCopy` for type `(MyType,)` in future versions
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
@ -6,8 +6,6 @@ LL | impl<T: lib::MyCopy> MyTrait for T { }
|
||||
...
|
||||
LL | impl MyTrait for (MyType,) { }
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `(MyType,)`
|
||||
|
|
||||
= note: upstream crates may add new impl of trait `lib::MyCopy` for type `(MyType,)` in future versions
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
@ -9,7 +9,7 @@ note: lint level defined here
|
||||
|
|
||||
LL | #![deny(unused)]
|
||||
| ^^^^^^
|
||||
= note: #[deny(unused_attributes)] implied by #[deny(unused)]
|
||||
= note: `#[deny(unused_attributes)]` implied by `#[deny(unused)]`
|
||||
|
||||
error: unused attribute
|
||||
--> $DIR/cfg-attr-empty-is-unused.rs:10:1
|
||||
|
@ -4,7 +4,7 @@ warning: use of deprecated item 'MustUseDeprecated'
|
||||
LL | impl MustUseDeprecated {
|
||||
| ^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: #[warn(deprecated)] on by default
|
||||
= note: `#[warn(deprecated)]` on by default
|
||||
|
||||
warning: use of deprecated item 'MustUseDeprecated'
|
||||
--> $DIR/cfg-attr-multi-true.rs:19:5
|
||||
|
@ -4,7 +4,7 @@ error: index out of bounds: the len is 3 but the index is 4
|
||||
LL | &{[1, 2, 3][4]};
|
||||
| ^^^^^^^^^^^^
|
||||
|
|
||||
= note: #[deny(const_err)] on by default
|
||||
= note: `#[deny(const_err)]` on by default
|
||||
|
||||
error: this expression will panic at runtime
|
||||
--> $DIR/array-literal-index-oob.rs:2:5
|
||||
|
@ -14,7 +14,7 @@ LL | const I32_REF_U8_UNION: u8 = unsafe { Nonsense { int_32_ref: &3 }.uint_
|
||||
| |
|
||||
| a raw memory access tried to access part of a pointer value as raw bytes
|
||||
|
|
||||
= note: #[deny(const_err)] on by default
|
||||
= note: `#[deny(const_err)]` on by default
|
||||
|
||||
error: any use of this value will cause an error
|
||||
--> $DIR/const-pointer-values-in-various-types.rs:30:45
|
||||
|
@ -6,7 +6,7 @@ LL | pub const Z: () = panic!("cheese");
|
||||
| |
|
||||
| the evaluated program panicked at 'cheese', $DIR/const_panic.rs:4:19
|
||||
|
|
||||
= note: #[deny(const_err)] on by default
|
||||
= note: `#[deny(const_err)]` on by default
|
||||
= note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
|
||||
|
||||
error: any use of this value will cause an error
|
||||
|
@ -6,7 +6,7 @@ LL | const Z: () = panic!("cheese");
|
||||
| |
|
||||
| the evaluated program panicked at 'cheese', $DIR/const_panic_libcore.rs:5:15
|
||||
|
|
||||
= note: #[deny(const_err)] on by default
|
||||
= note: `#[deny(const_err)]` on by default
|
||||
= note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
|
||||
|
||||
error: any use of this value will cause an error
|
||||
|
@ -6,7 +6,7 @@ LL | const Z: () = panic!("cheese");
|
||||
| |
|
||||
| the evaluated program panicked at 'cheese', $DIR/const_panic_libcore_main.rs:9:15
|
||||
|
|
||||
= note: #[deny(const_err)] on by default
|
||||
= note: `#[deny(const_err)]` on by default
|
||||
= note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
|
||||
|
||||
error: any use of this value will cause an error
|
||||
|
@ -6,7 +6,7 @@ LL | const X: bool = unsafe { &1 as *const i32 == &2 as *const i32 };
|
||||
| |
|
||||
| "pointer arithmetic or comparison" needs an rfc before being allowed inside constants
|
||||
|
|
||||
= note: #[deny(const_err)] on by default
|
||||
= note: `#[deny(const_err)]` on by default
|
||||
|
||||
error: any use of this value will cause an error
|
||||
--> $DIR/const_raw_ptr_ops.rs:12:28
|
||||
|
@ -4,7 +4,7 @@ error: index out of bounds: the len is 1 but the index is 1
|
||||
LL | array[1];
|
||||
| ^^^^^^^^
|
||||
|
|
||||
= note: #[deny(const_err)] on by default
|
||||
= note: `#[deny(const_err)]` on by default
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
@ -6,7 +6,7 @@ LL | const X: u64 = *wat(42);
|
||||
| |
|
||||
| dangling pointer was dereferenced
|
||||
|
|
||||
= note: #[deny(const_err)] on by default
|
||||
= note: `#[deny(const_err)]` on by default
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
@ -6,7 +6,7 @@ LL | const BAR: usize = [5, 6, 7][T::BOO];
|
||||
| |
|
||||
| index out of bounds: the len is 3 but the index is 42
|
||||
|
|
||||
= note: #[deny(const_err)] on by default
|
||||
= note: `#[deny(const_err)]` on by default
|
||||
|
||||
error[E0080]: evaluation of constant expression failed
|
||||
--> $DIR/issue-50814-2.rs:16:5
|
||||
|
@ -6,7 +6,7 @@ LL | const MAX: u8 = A::MAX + B::MAX;
|
||||
| |
|
||||
| attempt to add with overflow
|
||||
|
|
||||
= note: #[deny(const_err)] on by default
|
||||
= note: `#[deny(const_err)]` on by default
|
||||
|
||||
error[E0080]: evaluation of constant expression failed
|
||||
--> $DIR/issue-50814.rs:17:5
|
||||
|
@ -6,7 +6,7 @@ LL | const FOO: i32 = [][0];
|
||||
| |
|
||||
| index out of bounds: the len is 0 but the index is 0
|
||||
|
|
||||
= note: #[deny(const_err)] on by default
|
||||
= note: `#[deny(const_err)]` on by default
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
@ -6,7 +6,7 @@ LL | const SHL_U8: u8 = unsafe { intrinsics::unchecked_shl(5_u8, 8) };
|
||||
| |
|
||||
| Overflowing shift by 8 in unchecked_shl
|
||||
|
|
||||
= note: #[deny(const_err)] on by default
|
||||
= note: `#[deny(const_err)]` on by default
|
||||
|
||||
error: any use of this value will cause an error
|
||||
--> $DIR/const-int-unchecked.rs:16:31
|
||||
|
@ -6,7 +6,7 @@ LL | const LEN: usize = ONE - TWO;
|
||||
| |
|
||||
| attempt to subtract with overflow
|
||||
|
|
||||
= note: #[deny(const_err)] on by default
|
||||
= note: `#[deny(const_err)]` on by default
|
||||
|
||||
error[E0080]: evaluation of constant value failed
|
||||
--> $DIR/const-len-underflow-separate-spans.rs:11:17
|
||||
|
@ -4,7 +4,7 @@ error: index out of bounds: the len is 3 but the index is 3
|
||||
LL | [0; 3][3u64 as usize];
|
||||
| ^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: #[deny(const_err)] on by default
|
||||
= note: `#[deny(const_err)]` on by default
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
@ -4,7 +4,7 @@ error: index out of bounds: the len is 1 but the index is 1
|
||||
LL | println!("{}", xs[Enum::One as usize]);
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: #[deny(const_err)] on by default
|
||||
= note: `#[deny(const_err)]` on by default
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
@ -6,7 +6,7 @@ LL | const BAR: u32 = FOO[5];
|
||||
| |
|
||||
| index out of bounds: the len is 3 but the index is 5
|
||||
|
|
||||
= note: #[deny(const_err)] on by default
|
||||
= note: `#[deny(const_err)]` on by default
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
@ -7,7 +7,7 @@ LL | | unsafe { Foo { y: &y }.long_live_the_unit }
|
||||
LL | | };
|
||||
| |__^ type validation failed: encountered dangling pointer in final constant
|
||||
|
|
||||
= note: #[deny(const_err)] on by default
|
||||
= note: `#[deny(const_err)]` on by default
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
@ -7,7 +7,7 @@ LL | | &x
|
||||
LL | | };
|
||||
| |__^ type validation failed: encountered dangling pointer in final constant
|
||||
|
|
||||
= note: #[deny(const_err)] on by default
|
||||
= note: `#[deny(const_err)]` on by default
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
@ -11,7 +11,7 @@ LL | fake_type()
|
||||
LL | const CONSTANT: i32 = unsafe { fake_type() };
|
||||
| ---------------------------------------------
|
||||
|
|
||||
= note: #[deny(const_err)] on by default
|
||||
= note: `#[deny(const_err)]` on by default
|
||||
|
||||
error[E0080]: erroneous constant used
|
||||
--> $DIR/uninhabited-const-issue-61744.rs:18:10
|
||||
|
@ -4,5 +4,5 @@ warning: use of deprecated item 'std::sync::atomic::ATOMIC_ISIZE_INIT': the `new
|
||||
LL | static FOO: AtomicIsize = ATOMIC_ISIZE_INIT;
|
||||
| ^^^^^^^^^^^^^^^^^ help: replace the use of the deprecated item: `AtomicIsize::new(0)`
|
||||
|
|
||||
= note: #[warn(deprecated)] on by default
|
||||
= note: `#[warn(deprecated)]` on by default
|
||||
|
||||
|
@ -4,5 +4,5 @@ warning: use of deprecated item 'deprecated_future': text
|
||||
LL | deprecated_future(); // ok; deprecated_in_future only applies to rustc_deprecated
|
||||
| ^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: #[warn(deprecated)] on by default
|
||||
= note: `#[warn(deprecated)]` on by default
|
||||
|
||||
|
@ -9,7 +9,7 @@ note: lint level defined here
|
||||
|
|
||||
LL | #![deny(unused)]
|
||||
| ^^^^^^
|
||||
= note: #[deny(unused_attributes)] implied by #[deny(unused)]
|
||||
= note: `#[deny(unused_attributes)]` implied by `#[deny(unused)]`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
@ -16,7 +16,7 @@ LL |
|
||||
LL | (&mut self).bar();
|
||||
| ----------------- recursive call site
|
||||
|
|
||||
= note: #[warn(unconditional_recursion)] on by default
|
||||
= note: `#[warn(unconditional_recursion)]` on by default
|
||||
= help: a `loop` may express intention better if this is on purpose
|
||||
|
||||
error[E0596]: cannot borrow `self` as mutable, as it is not declared as mutable
|
||||
|
@ -9,5 +9,5 @@ note: lint level defined here
|
||||
|
|
||||
LL | #![warn(rust_2018_idioms)]
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
= note: #[warn(unused_extern_crates)] implied by #[warn(rust_2018_idioms)]
|
||||
= note: `#[warn(unused_extern_crates)]` implied by `#[warn(rust_2018_idioms)]`
|
||||
|
||||
|
@ -9,7 +9,7 @@ note: lint level defined here
|
||||
|
|
||||
LL | #[deny(warnings)]
|
||||
| ^^^^^^^^
|
||||
= note: #[deny(tyvar_behind_raw_pointer)] implied by #[deny(warnings)]
|
||||
= note: `#[deny(tyvar_behind_raw_pointer)]` implied by `#[deny(warnings)]`
|
||||
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition!
|
||||
= note: for more information, see issue #46906 <https://github.com/rust-lang/rust/issues/46906>
|
||||
|
||||
|
@ -6,7 +6,7 @@ LL | const VALUE: u8 = unsafe { *REG_ADDR };
|
||||
| |
|
||||
| a memory access tried to interpret some bytes as a pointer
|
||||
|
|
||||
= note: #[deny(const_err)] on by default
|
||||
= note: `#[deny(const_err)]` on by default
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
@ -192,7 +192,7 @@ warning: the feature `rust1` has been stable since 1.0.0 and no longer requires
|
||||
LL | #![feature(rust1)]
|
||||
| ^^^^^
|
||||
|
|
||||
= note: #[warn(stable_features)] on by default
|
||||
= note: `#[warn(stable_features)]` on by default
|
||||
|
||||
warning: unused attribute
|
||||
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:180:5
|
||||
|
@ -4,7 +4,7 @@ warning: attribute must be of the form `#[inline]` or `#[inline(always|never)]`
|
||||
LL | #[inline = "2100"] fn f() { }
|
||||
| ^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: #[warn(ill_formed_attribute_input)] on by default
|
||||
= note: `#[warn(ill_formed_attribute_input)]` on by default
|
||||
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
|
||||
= note: for more information, see issue #57571 <https://github.com/rust-lang/rust/issues/57571>
|
||||
|
||||
|
@ -6,7 +6,7 @@ LL | fn foo(self: Ptr<Self>);
|
||||
|
|
||||
= note: for more information, see https://github.com/rust-lang/rust/issues/44874
|
||||
= help: add `#![feature(arbitrary_self_types)]` to the crate attributes to enable
|
||||
= help: consider changing to `self`, `&self`, `&mut self`, or `self: Box<Self>`
|
||||
= help: consider changing to `self`, `&self`, `&mut self`, `self: Box<Self>`, `self: Rc<Self>`, `self: Arc<Self>`, or `self: Pin<P>` (where P is one of the previous types except `Self`)
|
||||
|
||||
error[E0658]: `Ptr<Bar>` cannot be used as the type of `self` without the `arbitrary_self_types` feature
|
||||
--> $DIR/feature-gate-arbitrary-self-types.rs:22:18
|
||||
@ -16,7 +16,7 @@ LL | fn foo(self: Ptr<Self>) {}
|
||||
|
|
||||
= note: for more information, see https://github.com/rust-lang/rust/issues/44874
|
||||
= help: add `#![feature(arbitrary_self_types)]` to the crate attributes to enable
|
||||
= help: consider changing to `self`, `&self`, `&mut self`, or `self: Box<Self>`
|
||||
= help: consider changing to `self`, `&self`, `&mut self`, `self: Box<Self>`, `self: Rc<Self>`, `self: Arc<Self>`, or `self: Pin<P>` (where P is one of the previous types except `Self`)
|
||||
|
||||
error[E0658]: `std::boxed::Box<Ptr<Bar>>` cannot be used as the type of `self` without the `arbitrary_self_types` feature
|
||||
--> $DIR/feature-gate-arbitrary-self-types.rs:26:18
|
||||
@ -26,7 +26,7 @@ LL | fn bar(self: Box<Ptr<Self>>) {}
|
||||
|
|
||||
= note: for more information, see https://github.com/rust-lang/rust/issues/44874
|
||||
= help: add `#![feature(arbitrary_self_types)]` to the crate attributes to enable
|
||||
= help: consider changing to `self`, `&self`, `&mut self`, or `self: Box<Self>`
|
||||
= help: consider changing to `self`, `&self`, `&mut self`, `self: Box<Self>`, `self: Rc<Self>`, `self: Arc<Self>`, or `self: Pin<P>` (where P is one of the previous types except `Self`)
|
||||
|
||||
error: aborting due to 3 previous errors
|
||||
|
||||
|
@ -6,7 +6,7 @@ LL | fn bar(self: *const Self);
|
||||
|
|
||||
= note: for more information, see https://github.com/rust-lang/rust/issues/44874
|
||||
= help: add `#![feature(arbitrary_self_types)]` to the crate attributes to enable
|
||||
= help: consider changing to `self`, `&self`, `&mut self`, or `self: Box<Self>`
|
||||
= help: consider changing to `self`, `&self`, `&mut self`, `self: Box<Self>`, `self: Rc<Self>`, `self: Arc<Self>`, or `self: Pin<P>` (where P is one of the previous types except `Self`)
|
||||
|
||||
error[E0658]: `*const Foo` cannot be used as the type of `self` without the `arbitrary_self_types` feature
|
||||
--> $DIR/feature-gate-arbitrary_self_types-raw-pointer.rs:4:18
|
||||
@ -16,7 +16,7 @@ LL | fn foo(self: *const Self) {}
|
||||
|
|
||||
= note: for more information, see https://github.com/rust-lang/rust/issues/44874
|
||||
= help: add `#![feature(arbitrary_self_types)]` to the crate attributes to enable
|
||||
= help: consider changing to `self`, `&self`, `&mut self`, or `self: Box<Self>`
|
||||
= help: consider changing to `self`, `&self`, `&mut self`, `self: Box<Self>`, `self: Rc<Self>`, `self: Arc<Self>`, or `self: Pin<P>` (where P is one of the previous types except `Self`)
|
||||
|
||||
error[E0658]: `*const ()` cannot be used as the type of `self` without the `arbitrary_self_types` feature
|
||||
--> $DIR/feature-gate-arbitrary_self_types-raw-pointer.rs:14:18
|
||||
@ -26,7 +26,7 @@ LL | fn bar(self: *const Self) {}
|
||||
|
|
||||
= note: for more information, see https://github.com/rust-lang/rust/issues/44874
|
||||
= help: add `#![feature(arbitrary_self_types)]` to the crate attributes to enable
|
||||
= help: consider changing to `self`, `&self`, `&mut self`, or `self: Box<Self>`
|
||||
= help: consider changing to `self`, `&self`, `&mut self`, `self: Box<Self>`, `self: Rc<Self>`, `self: Arc<Self>`, or `self: Pin<P>` (where P is one of the previous types except `Self`)
|
||||
|
||||
error: aborting due to 3 previous errors
|
||||
|
||||
|
@ -4,7 +4,7 @@ error: defaults for type parameters are only allowed in `struct`, `enum`, `type`
|
||||
LL | fn avg<T=i32>(_: T) {}
|
||||
| ^
|
||||
|
|
||||
= note: #[deny(invalid_type_param_default)] on by default
|
||||
= note: `#[deny(invalid_type_param_default)]` on by default
|
||||
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
|
||||
= note: for more information, see issue #36887 <https://github.com/rust-lang/rust/issues/36887>
|
||||
|
||||
|
@ -9,7 +9,7 @@ note: lint level defined here
|
||||
|
|
||||
LL | #![deny(future_incompatible)]
|
||||
| ^^^^^^^^^^^^^^^^^^^
|
||||
= note: #[deny(anonymous_parameters)] implied by #[deny(future_incompatible)]
|
||||
= note: `#[deny(anonymous_parameters)]` implied by `#[deny(future_incompatible)]`
|
||||
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition!
|
||||
= note: for more information, see issue #41686 <https://github.com/rust-lang/rust/issues/41686>
|
||||
|
||||
|
18
src/test/ui/generator/issue-62506-two_awaits.rs
Normal file
18
src/test/ui/generator/issue-62506-two_awaits.rs
Normal file
@ -0,0 +1,18 @@
|
||||
// Output = String caused an ICE whereas Output = &'static str compiled successfully.
|
||||
// Broken MIR: generator contains type std::string::String in MIR,
|
||||
// but typeck only knows about {<S as T>::Future, ()}
|
||||
// check-pass
|
||||
// edition:2018
|
||||
|
||||
#![feature(async_await)]
|
||||
use std::future::Future;
|
||||
|
||||
pub trait T {
|
||||
type Future: Future<Output = String>;
|
||||
fn bar() -> Self::Future;
|
||||
}
|
||||
pub async fn foo<S>() where S: T {
|
||||
S::bar().await;
|
||||
S::bar().await;
|
||||
}
|
||||
pub fn main() {}
|
@ -11,7 +11,7 @@ LL | | no_hrtb(&mut t);
|
||||
LL | | }
|
||||
| |_^ cannot return without recursing
|
||||
|
|
||||
= note: #[warn(unconditional_recursion)] on by default
|
||||
= note: `#[warn(unconditional_recursion)]` on by default
|
||||
= help: a `loop` may express intention better if this is on purpose
|
||||
|
||||
warning: function cannot return without recursing
|
||||
|
@ -1,4 +1,3 @@
|
||||
// run-pass
|
||||
// ignore-pretty pretty-printing is unhygienic
|
||||
|
||||
#[macro_export]
|
@ -1,2 +1 @@
|
||||
// run-pass
|
||||
pub fn f() {}
|
@ -1,4 +1,3 @@
|
||||
// run-pass
|
||||
#![crate_type = "lib"]
|
||||
|
||||
extern crate my_crate;
|
@ -1,4 +1,3 @@
|
||||
// run-pass
|
||||
#![feature(decl_macro)]
|
||||
#![allow(unused)]
|
||||
|
@ -1,6 +1,6 @@
|
||||
// Make sure `$crate` and `crate` work in for basic cases of nested macros.
|
||||
|
||||
// build-pass (FIXME(62277): could be check-pass?)
|
||||
// check-pass
|
||||
// aux-build:intercrate.rs
|
||||
|
||||
#![feature(decl_macro, crate_in_paths)]
|
||||
|
@ -4,5 +4,5 @@ warning: the feature `crate_in_paths` has been stable since 1.30.0 and no longer
|
||||
LL | #![feature(decl_macro, crate_in_paths)]
|
||||
| ^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: #[warn(stable_features)] on by default
|
||||
= note: `#[warn(stable_features)]` on by default
|
||||
|
||||
|
@ -1,6 +1,3 @@
|
||||
// FIXME: Investigate why expansion info for a single expansion id is reset from
|
||||
// `MacroBang(format_args)` to `MacroAttribute(derive(Clone))` (issue #52363).
|
||||
|
||||
fn main() {
|
||||
format_args!({ #[derive(Clone)] struct S; });
|
||||
//~^ ERROR format argument must be a string literal
|
||||
|
@ -1,5 +1,5 @@
|
||||
error: format argument must be a string literal
|
||||
--> $DIR/expansion-info-reset.rs:5:18
|
||||
--> $DIR/expansion-info-reset.rs:2:18
|
||||
|
|
||||
LL | format_args!({ #[derive(Clone)] struct S; });
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user