Auto merge of #70483 - Centril:rollup-slli4yf, r=Centril
Rollup of 5 pull requests Successful merges: - #70345 (Remove `no_integrated_as` mode.) - #70434 (suggest `;` on expr `mac!()` which is good as stmt `mac!()`) - #70457 (non-exhastive diagnostic: add note re. scrutinee type) - #70478 (Refactor type_of for constants) - #70480 (clarify hir_id <-> node_id method names) Failed merges: r? @ghost
This commit is contained in:
commit
2acf32d9ad
86 changed files with 483 additions and 251 deletions
|
@ -241,8 +241,8 @@ impl<'a, 'hir> NodeCollector<'a, 'hir> {
|
||||||
// Make sure that the DepNode of some node coincides with the HirId
|
// Make sure that the DepNode of some node coincides with the HirId
|
||||||
// owner of that node.
|
// owner of that node.
|
||||||
if cfg!(debug_assertions) {
|
if cfg!(debug_assertions) {
|
||||||
let node_id = self.definitions.hir_to_node_id(hir_id);
|
let node_id = self.definitions.hir_id_to_node_id(hir_id);
|
||||||
assert_eq!(self.definitions.node_to_hir_id(node_id), hir_id);
|
assert_eq!(self.definitions.node_id_to_hir_id(node_id), hir_id);
|
||||||
|
|
||||||
if hir_id.owner != self.current_dep_node_owner {
|
if hir_id.owner != self.current_dep_node_owner {
|
||||||
let node_str = match self.definitions.opt_local_def_id(node_id) {
|
let node_str = match self.definitions.opt_local_def_id(node_id) {
|
||||||
|
@ -342,7 +342,9 @@ impl<'a, 'hir> Visitor<'hir> for NodeCollector<'a, 'hir> {
|
||||||
debug!("visit_item: {:?}", i);
|
debug!("visit_item: {:?}", i);
|
||||||
debug_assert_eq!(
|
debug_assert_eq!(
|
||||||
i.hir_id.owner,
|
i.hir_id.owner,
|
||||||
self.definitions.opt_local_def_id(self.definitions.hir_to_node_id(i.hir_id)).unwrap()
|
self.definitions
|
||||||
|
.opt_local_def_id(self.definitions.hir_id_to_node_id(i.hir_id))
|
||||||
|
.unwrap()
|
||||||
);
|
);
|
||||||
self.with_dep_node_owner(i.hir_id.owner, i, |this, hash| {
|
self.with_dep_node_owner(i.hir_id.owner, i, |this, hash| {
|
||||||
this.insert_with_hash(i.span, i.hir_id, Node::Item(i), hash);
|
this.insert_with_hash(i.span, i.hir_id, Node::Item(i), hash);
|
||||||
|
@ -374,7 +376,9 @@ impl<'a, 'hir> Visitor<'hir> for NodeCollector<'a, 'hir> {
|
||||||
fn visit_trait_item(&mut self, ti: &'hir TraitItem<'hir>) {
|
fn visit_trait_item(&mut self, ti: &'hir TraitItem<'hir>) {
|
||||||
debug_assert_eq!(
|
debug_assert_eq!(
|
||||||
ti.hir_id.owner,
|
ti.hir_id.owner,
|
||||||
self.definitions.opt_local_def_id(self.definitions.hir_to_node_id(ti.hir_id)).unwrap()
|
self.definitions
|
||||||
|
.opt_local_def_id(self.definitions.hir_id_to_node_id(ti.hir_id))
|
||||||
|
.unwrap()
|
||||||
);
|
);
|
||||||
self.with_dep_node_owner(ti.hir_id.owner, ti, |this, hash| {
|
self.with_dep_node_owner(ti.hir_id.owner, ti, |this, hash| {
|
||||||
this.insert_with_hash(ti.span, ti.hir_id, Node::TraitItem(ti), hash);
|
this.insert_with_hash(ti.span, ti.hir_id, Node::TraitItem(ti), hash);
|
||||||
|
@ -388,7 +392,9 @@ impl<'a, 'hir> Visitor<'hir> for NodeCollector<'a, 'hir> {
|
||||||
fn visit_impl_item(&mut self, ii: &'hir ImplItem<'hir>) {
|
fn visit_impl_item(&mut self, ii: &'hir ImplItem<'hir>) {
|
||||||
debug_assert_eq!(
|
debug_assert_eq!(
|
||||||
ii.hir_id.owner,
|
ii.hir_id.owner,
|
||||||
self.definitions.opt_local_def_id(self.definitions.hir_to_node_id(ii.hir_id)).unwrap()
|
self.definitions
|
||||||
|
.opt_local_def_id(self.definitions.hir_id_to_node_id(ii.hir_id))
|
||||||
|
.unwrap()
|
||||||
);
|
);
|
||||||
self.with_dep_node_owner(ii.hir_id.owner, ii, |this, hash| {
|
self.with_dep_node_owner(ii.hir_id.owner, ii, |this, hash| {
|
||||||
this.insert_with_hash(ii.span, ii.hir_id, Node::ImplItem(ii), hash);
|
this.insert_with_hash(ii.span, ii.hir_id, Node::ImplItem(ii), hash);
|
||||||
|
|
|
@ -161,7 +161,7 @@ impl<'hir> Map<'hir> {
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn local_def_id_from_node_id(&self, node: NodeId) -> DefId {
|
pub fn local_def_id_from_node_id(&self, node: NodeId) -> DefId {
|
||||||
self.opt_local_def_id_from_node_id(node).unwrap_or_else(|| {
|
self.opt_local_def_id_from_node_id(node).unwrap_or_else(|| {
|
||||||
let hir_id = self.node_to_hir_id(node);
|
let hir_id = self.node_id_to_hir_id(node);
|
||||||
bug!(
|
bug!(
|
||||||
"local_def_id_from_node_id: no entry for `{}`, which has a map of `{:?}`",
|
"local_def_id_from_node_id: no entry for `{}`, which has a map of `{:?}`",
|
||||||
node,
|
node,
|
||||||
|
@ -184,7 +184,7 @@ impl<'hir> Map<'hir> {
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn opt_local_def_id(&self, hir_id: HirId) -> Option<DefId> {
|
pub fn opt_local_def_id(&self, hir_id: HirId) -> Option<DefId> {
|
||||||
let node_id = self.hir_to_node_id(hir_id);
|
let node_id = self.hir_id_to_node_id(hir_id);
|
||||||
self.opt_local_def_id_from_node_id(node_id)
|
self.opt_local_def_id_from_node_id(node_id)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -204,13 +204,13 @@ impl<'hir> Map<'hir> {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn hir_to_node_id(&self, hir_id: HirId) -> NodeId {
|
pub fn hir_id_to_node_id(&self, hir_id: HirId) -> NodeId {
|
||||||
self.tcx.definitions.hir_to_node_id(hir_id)
|
self.tcx.definitions.hir_id_to_node_id(hir_id)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn node_to_hir_id(&self, node_id: NodeId) -> HirId {
|
pub fn node_id_to_hir_id(&self, node_id: NodeId) -> HirId {
|
||||||
self.tcx.definitions.node_to_hir_id(node_id)
|
self.tcx.definitions.node_id_to_hir_id(node_id)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
|
|
|
@ -137,7 +137,7 @@ impl<'a> StableHashingContext<'a> {
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn node_to_hir_id(&self, node_id: ast::NodeId) -> hir::HirId {
|
pub fn node_to_hir_id(&self, node_id: ast::NodeId) -> hir::HirId {
|
||||||
self.definitions.node_to_hir_id(node_id)
|
self.definitions.node_id_to_hir_id(node_id)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
|
|
|
@ -1126,11 +1126,11 @@ impl<'tcx> TyCtxt<'tcx> {
|
||||||
|
|
||||||
let mut trait_map: FxHashMap<_, FxHashMap<_, _>> = FxHashMap::default();
|
let mut trait_map: FxHashMap<_, FxHashMap<_, _>> = FxHashMap::default();
|
||||||
for (k, v) in resolutions.trait_map {
|
for (k, v) in resolutions.trait_map {
|
||||||
let hir_id = definitions.node_to_hir_id(k);
|
let hir_id = definitions.node_id_to_hir_id(k);
|
||||||
let map = trait_map.entry(hir_id.owner).or_default();
|
let map = trait_map.entry(hir_id.owner).or_default();
|
||||||
let v = v
|
let v = v
|
||||||
.into_iter()
|
.into_iter()
|
||||||
.map(|tc| tc.map_import_ids(|id| definitions.node_to_hir_id(id)))
|
.map(|tc| tc.map_import_ids(|id| definitions.node_id_to_hir_id(id)))
|
||||||
.collect();
|
.collect();
|
||||||
map.insert(hir_id.local_id, StableVec::new(v));
|
map.insert(hir_id.local_id, StableVec::new(v));
|
||||||
}
|
}
|
||||||
|
@ -1154,7 +1154,7 @@ impl<'tcx> TyCtxt<'tcx> {
|
||||||
.map(|(k, v)| {
|
.map(|(k, v)| {
|
||||||
let exports: Vec<_> = v
|
let exports: Vec<_> = v
|
||||||
.into_iter()
|
.into_iter()
|
||||||
.map(|e| e.map_id(|id| definitions.node_to_hir_id(id)))
|
.map(|e| e.map_id(|id| definitions.node_id_to_hir_id(id)))
|
||||||
.collect();
|
.collect();
|
||||||
(k, exports)
|
(k, exports)
|
||||||
})
|
})
|
||||||
|
|
|
@ -16,9 +16,7 @@ use crate::ModuleLlvm;
|
||||||
use log::debug;
|
use log::debug;
|
||||||
use rustc::bug;
|
use rustc::bug;
|
||||||
use rustc::ty::TyCtxt;
|
use rustc::ty::TyCtxt;
|
||||||
use rustc_codegen_ssa::back::write::{
|
use rustc_codegen_ssa::back::write::{BitcodeSection, CodegenContext, EmitObj, ModuleConfig};
|
||||||
run_assembler, BitcodeSection, CodegenContext, EmitObj, ModuleConfig,
|
|
||||||
};
|
|
||||||
use rustc_codegen_ssa::traits::*;
|
use rustc_codegen_ssa::traits::*;
|
||||||
use rustc_codegen_ssa::{CompiledModule, ModuleCodegen, RLIB_BYTECODE_EXTENSION};
|
use rustc_codegen_ssa::{CompiledModule, ModuleCodegen, RLIB_BYTECODE_EXTENSION};
|
||||||
use rustc_data_structures::small_c_str::SmallCStr;
|
use rustc_data_structures::small_c_str::SmallCStr;
|
||||||
|
@ -734,18 +732,21 @@ pub(crate) unsafe fn codegen(
|
||||||
})?;
|
})?;
|
||||||
}
|
}
|
||||||
|
|
||||||
let config_emit_object_code = matches!(config.emit_obj, EmitObj::ObjectCode(_));
|
if config.emit_asm {
|
||||||
|
|
||||||
if config.emit_asm || (config_emit_object_code && config.no_integrated_as) {
|
|
||||||
let _timer = cgcx
|
let _timer = cgcx
|
||||||
.prof
|
.prof
|
||||||
.generic_activity_with_arg("LLVM_module_codegen_emit_asm", &module.name[..]);
|
.generic_activity_with_arg("LLVM_module_codegen_emit_asm", &module.name[..]);
|
||||||
let path = cgcx.output_filenames.temp_path(OutputType::Assembly, module_name);
|
let path = cgcx.output_filenames.temp_path(OutputType::Assembly, module_name);
|
||||||
|
|
||||||
// We can't use the same module for asm and binary output, because that triggers
|
// We can't use the same module for asm and object code output,
|
||||||
// various errors like invalid IR or broken binaries, so we might have to clone the
|
// because that triggers various errors like invalid IR or broken
|
||||||
// module to produce the asm output
|
// binaries. So we must clone the module to produce the asm output
|
||||||
let llmod = if config_emit_object_code { llvm::LLVMCloneModule(llmod) } else { llmod };
|
// if we are also producing object code.
|
||||||
|
let llmod = if let EmitObj::ObjectCode(_) = config.emit_obj {
|
||||||
|
llvm::LLVMCloneModule(llmod)
|
||||||
|
} else {
|
||||||
|
llmod
|
||||||
|
};
|
||||||
with_codegen(tm, llmod, config.no_builtins, |cpm| {
|
with_codegen(tm, llmod, config.no_builtins, |cpm| {
|
||||||
write_output_file(diag_handler, tm, cpm, llmod, &path, llvm::FileType::AssemblyFile)
|
write_output_file(diag_handler, tm, cpm, llmod, &path, llvm::FileType::AssemblyFile)
|
||||||
})?;
|
})?;
|
||||||
|
@ -753,34 +754,19 @@ pub(crate) unsafe fn codegen(
|
||||||
|
|
||||||
match config.emit_obj {
|
match config.emit_obj {
|
||||||
EmitObj::ObjectCode(_) => {
|
EmitObj::ObjectCode(_) => {
|
||||||
if !config.no_integrated_as {
|
let _timer = cgcx
|
||||||
let _timer = cgcx.prof.generic_activity_with_arg(
|
.prof
|
||||||
"LLVM_module_codegen_emit_obj",
|
.generic_activity_with_arg("LLVM_module_codegen_emit_obj", &module.name[..]);
|
||||||
&module.name[..],
|
with_codegen(tm, llmod, config.no_builtins, |cpm| {
|
||||||
);
|
write_output_file(
|
||||||
with_codegen(tm, llmod, config.no_builtins, |cpm| {
|
diag_handler,
|
||||||
write_output_file(
|
tm,
|
||||||
diag_handler,
|
cpm,
|
||||||
tm,
|
llmod,
|
||||||
cpm,
|
&obj_out,
|
||||||
llmod,
|
llvm::FileType::ObjectFile,
|
||||||
&obj_out,
|
)
|
||||||
llvm::FileType::ObjectFile,
|
})?;
|
||||||
)
|
|
||||||
})?;
|
|
||||||
} else {
|
|
||||||
let _timer = cgcx.prof.generic_activity_with_arg(
|
|
||||||
"LLVM_module_codegen_asm_to_obj",
|
|
||||||
&module.name[..],
|
|
||||||
);
|
|
||||||
let assembly =
|
|
||||||
cgcx.output_filenames.temp_path(OutputType::Assembly, module_name);
|
|
||||||
run_assembler(cgcx, diag_handler, &assembly, &obj_out);
|
|
||||||
|
|
||||||
if !config.emit_asm && !cgcx.save_temps {
|
|
||||||
drop(fs::remove_file(&assembly));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
EmitObj::Bitcode => {
|
EmitObj::Bitcode => {
|
||||||
|
@ -802,6 +788,7 @@ pub(crate) unsafe fn codegen(
|
||||||
|
|
||||||
drop(handlers);
|
drop(handlers);
|
||||||
}
|
}
|
||||||
|
|
||||||
Ok(module.into_compiled_module(
|
Ok(module.into_compiled_module(
|
||||||
config.emit_obj != EmitObj::None,
|
config.emit_obj != EmitObj::None,
|
||||||
config.emit_bc,
|
config.emit_bc,
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
use super::command::Command;
|
use super::link::{self, remove};
|
||||||
use super::link::{self, get_linker, remove};
|
|
||||||
use super::linker::LinkerInfo;
|
use super::linker::LinkerInfo;
|
||||||
use super::lto::{self, SerializedModule};
|
use super::lto::{self, SerializedModule};
|
||||||
use super::symbol_export::symbol_name_for_instance_in_crate;
|
use super::symbol_export::symbol_name_for_instance_in_crate;
|
||||||
|
@ -116,7 +115,6 @@ pub struct ModuleConfig {
|
||||||
pub merge_functions: bool,
|
pub merge_functions: bool,
|
||||||
pub inline_threshold: Option<usize>,
|
pub inline_threshold: Option<usize>,
|
||||||
pub new_llvm_pass_manager: Option<bool>,
|
pub new_llvm_pass_manager: Option<bool>,
|
||||||
pub no_integrated_as: bool,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
impl ModuleConfig {
|
impl ModuleConfig {
|
||||||
|
@ -140,7 +138,6 @@ impl ModuleConfig {
|
||||||
emit_ir: false,
|
emit_ir: false,
|
||||||
emit_asm: false,
|
emit_asm: false,
|
||||||
emit_obj: EmitObj::None,
|
emit_obj: EmitObj::None,
|
||||||
no_integrated_as: false,
|
|
||||||
|
|
||||||
verify_llvm_ir: false,
|
verify_llvm_ir: false,
|
||||||
no_prepopulate_passes: false,
|
no_prepopulate_passes: false,
|
||||||
|
@ -202,12 +199,6 @@ impl ModuleConfig {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Assembler name and command used by codegen when no_integrated_as is enabled
|
|
||||||
pub struct AssemblerCommand {
|
|
||||||
name: PathBuf,
|
|
||||||
cmd: Command,
|
|
||||||
}
|
|
||||||
|
|
||||||
// HACK(eddyb) work around `#[derive]` producing wrong bounds for `Clone`.
|
// HACK(eddyb) work around `#[derive]` producing wrong bounds for `Clone`.
|
||||||
pub struct TargetMachineFactory<B: WriteBackendMethods>(
|
pub struct TargetMachineFactory<B: WriteBackendMethods>(
|
||||||
pub Arc<dyn Fn() -> Result<B::TargetMachine, String> + Send + Sync>,
|
pub Arc<dyn Fn() -> Result<B::TargetMachine, String> + Send + Sync>,
|
||||||
|
@ -260,8 +251,6 @@ pub struct CodegenContext<B: WriteBackendMethods> {
|
||||||
pub cgu_reuse_tracker: CguReuseTracker,
|
pub cgu_reuse_tracker: CguReuseTracker,
|
||||||
// Channel back to the main control thread to send messages to
|
// Channel back to the main control thread to send messages to
|
||||||
pub coordinator_send: Sender<Box<dyn Any + Send>>,
|
pub coordinator_send: Sender<Box<dyn Any + Send>>,
|
||||||
// The assembler command if no_integrated_as option is enabled, None otherwise
|
|
||||||
pub assembler_cmd: Option<Arc<AssemblerCommand>>,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<B: WriteBackendMethods> CodegenContext<B> {
|
impl<B: WriteBackendMethods> CodegenContext<B> {
|
||||||
|
@ -415,9 +404,6 @@ pub fn start_async_codegen<B: ExtraBackendMethods>(
|
||||||
|
|
||||||
modules_config.emit_pre_lto_bc = need_pre_lto_bitcode_for_incr_comp(sess);
|
modules_config.emit_pre_lto_bc = need_pre_lto_bitcode_for_incr_comp(sess);
|
||||||
|
|
||||||
modules_config.no_integrated_as =
|
|
||||||
tcx.sess.opts.cg.no_integrated_as || tcx.sess.target.target.options.no_integrated_as;
|
|
||||||
|
|
||||||
for output_type in sess.opts.output_types.keys() {
|
for output_type in sess.opts.output_types.keys() {
|
||||||
match *output_type {
|
match *output_type {
|
||||||
OutputType::Bitcode => {
|
OutputType::Bitcode => {
|
||||||
|
@ -1030,17 +1016,6 @@ fn start_executing_work<B: ExtraBackendMethods>(
|
||||||
each_linked_rlib_for_lto.push((cnum, path.to_path_buf()));
|
each_linked_rlib_for_lto.push((cnum, path.to_path_buf()));
|
||||||
}));
|
}));
|
||||||
|
|
||||||
let assembler_cmd = if modules_config.no_integrated_as {
|
|
||||||
// HACK: currently we use linker (gcc) as our assembler
|
|
||||||
let (linker, flavor) = link::linker_and_flavor(sess);
|
|
||||||
|
|
||||||
let (name, mut cmd) = get_linker(sess, &linker, flavor);
|
|
||||||
cmd.args(&sess.target.target.options.asm_args);
|
|
||||||
Some(Arc::new(AssemblerCommand { name, cmd }))
|
|
||||||
} else {
|
|
||||||
None
|
|
||||||
};
|
|
||||||
|
|
||||||
let ol = if tcx.sess.opts.debugging_opts.no_codegen
|
let ol = if tcx.sess.opts.debugging_opts.no_codegen
|
||||||
|| !tcx.sess.opts.output_types.should_codegen()
|
|| !tcx.sess.opts.output_types.should_codegen()
|
||||||
{
|
{
|
||||||
|
@ -1076,7 +1051,6 @@ fn start_executing_work<B: ExtraBackendMethods>(
|
||||||
target_pointer_width: tcx.sess.target.target.target_pointer_width.clone(),
|
target_pointer_width: tcx.sess.target.target.target_pointer_width.clone(),
|
||||||
target_arch: tcx.sess.target.target.arch.clone(),
|
target_arch: tcx.sess.target.target.arch.clone(),
|
||||||
debuginfo: tcx.sess.opts.debuginfo,
|
debuginfo: tcx.sess.opts.debuginfo,
|
||||||
assembler_cmd,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// This is the "main loop" of parallel work happening for parallel codegen.
|
// This is the "main loop" of parallel work happening for parallel codegen.
|
||||||
|
@ -1610,44 +1584,6 @@ fn spawn_work<B: ExtraBackendMethods>(cgcx: CodegenContext<B>, work: WorkItem<B>
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn run_assembler<B: ExtraBackendMethods>(
|
|
||||||
cgcx: &CodegenContext<B>,
|
|
||||||
handler: &Handler,
|
|
||||||
assembly: &Path,
|
|
||||||
object: &Path,
|
|
||||||
) {
|
|
||||||
let assembler = cgcx.assembler_cmd.as_ref().expect("cgcx.assembler_cmd is missing?");
|
|
||||||
|
|
||||||
let pname = &assembler.name;
|
|
||||||
let mut cmd = assembler.cmd.clone();
|
|
||||||
cmd.arg("-c").arg("-o").arg(object).arg(assembly);
|
|
||||||
debug!("{:?}", cmd);
|
|
||||||
|
|
||||||
match cmd.output() {
|
|
||||||
Ok(prog) => {
|
|
||||||
if !prog.status.success() {
|
|
||||||
let mut note = prog.stderr.clone();
|
|
||||||
note.extend_from_slice(&prog.stdout);
|
|
||||||
|
|
||||||
handler
|
|
||||||
.struct_err(&format!(
|
|
||||||
"linking with `{}` failed: {}",
|
|
||||||
pname.display(),
|
|
||||||
prog.status
|
|
||||||
))
|
|
||||||
.note(&format!("{:?}", &cmd))
|
|
||||||
.note(str::from_utf8(¬e[..]).unwrap())
|
|
||||||
.emit();
|
|
||||||
handler.abort_if_errors();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Err(e) => {
|
|
||||||
handler.err(&format!("could not exec the linker `{}`: {}", pname.display(), e));
|
|
||||||
handler.abort_if_errors();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
enum SharedEmitterMessage {
|
enum SharedEmitterMessage {
|
||||||
Diagnostic(Diagnostic),
|
Diagnostic(Diagnostic),
|
||||||
InlineAsmError(u32, String),
|
InlineAsmError(u32, String),
|
||||||
|
|
|
@ -86,6 +86,7 @@ fn suggest_slice_pat(e: &mut DiagnosticBuilder<'_>, site_span: Span, parser: &Pa
|
||||||
fn emit_frag_parse_err(
|
fn emit_frag_parse_err(
|
||||||
mut e: DiagnosticBuilder<'_>,
|
mut e: DiagnosticBuilder<'_>,
|
||||||
parser: &Parser<'_>,
|
parser: &Parser<'_>,
|
||||||
|
orig_parser: &mut Parser<'_>,
|
||||||
site_span: Span,
|
site_span: Span,
|
||||||
macro_ident: ast::Ident,
|
macro_ident: ast::Ident,
|
||||||
arm_span: Span,
|
arm_span: Span,
|
||||||
|
@ -118,6 +119,21 @@ fn emit_frag_parse_err(
|
||||||
AstFragmentKind::Pat if macro_ident.name == sym::vec => {
|
AstFragmentKind::Pat if macro_ident.name == sym::vec => {
|
||||||
suggest_slice_pat(&mut e, site_span, parser);
|
suggest_slice_pat(&mut e, site_span, parser);
|
||||||
}
|
}
|
||||||
|
// Try a statement if an expression is wanted but failed and suggest adding `;` to call.
|
||||||
|
AstFragmentKind::Expr => match parse_ast_fragment(orig_parser, AstFragmentKind::Stmts) {
|
||||||
|
Err(mut err) => err.cancel(),
|
||||||
|
Ok(_) => {
|
||||||
|
e.note(
|
||||||
|
"the macro call doesn't expand to an expression, but it can expand to a statement",
|
||||||
|
);
|
||||||
|
e.span_suggestion_verbose(
|
||||||
|
site_span.shrink_to_hi(),
|
||||||
|
"add `;` to interpret the expansion as a statement",
|
||||||
|
";".to_string(),
|
||||||
|
Applicability::MaybeIncorrect,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
},
|
||||||
_ => annotate_err_with_kind(&mut e, kind, site_span),
|
_ => annotate_err_with_kind(&mut e, kind, site_span),
|
||||||
};
|
};
|
||||||
e.emit();
|
e.emit();
|
||||||
|
@ -126,10 +142,11 @@ fn emit_frag_parse_err(
|
||||||
impl<'a> ParserAnyMacro<'a> {
|
impl<'a> ParserAnyMacro<'a> {
|
||||||
crate fn make(mut self: Box<ParserAnyMacro<'a>>, kind: AstFragmentKind) -> AstFragment {
|
crate fn make(mut self: Box<ParserAnyMacro<'a>>, kind: AstFragmentKind) -> AstFragment {
|
||||||
let ParserAnyMacro { site_span, macro_ident, ref mut parser, arm_span } = *self;
|
let ParserAnyMacro { site_span, macro_ident, ref mut parser, arm_span } = *self;
|
||||||
|
let snapshot = &mut parser.clone();
|
||||||
let fragment = match parse_ast_fragment(parser, kind) {
|
let fragment = match parse_ast_fragment(parser, kind) {
|
||||||
Ok(f) => f,
|
Ok(f) => f,
|
||||||
Err(err) => {
|
Err(err) => {
|
||||||
emit_frag_parse_err(err, parser, site_span, macro_ident, arm_span, kind);
|
emit_frag_parse_err(err, parser, snapshot, site_span, macro_ident, arm_span, kind);
|
||||||
return kind.dummy(site_span);
|
return kind.dummy(site_span);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -353,15 +353,13 @@ impl Definitions {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// FIXME(eddyb) rename to `hir_id_to_node_id`.
|
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn hir_to_node_id(&self, hir_id: hir::HirId) -> ast::NodeId {
|
pub fn hir_id_to_node_id(&self, hir_id: hir::HirId) -> ast::NodeId {
|
||||||
self.hir_id_to_node_id[&hir_id]
|
self.hir_id_to_node_id[&hir_id]
|
||||||
}
|
}
|
||||||
|
|
||||||
// FIXME(eddyb) rename to `node_id_to_hir_id`.
|
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn node_to_hir_id(&self, node_id: ast::NodeId) -> hir::HirId {
|
pub fn node_id_to_hir_id(&self, node_id: ast::NodeId) -> hir::HirId {
|
||||||
self.node_id_to_hir_id[node_id]
|
self.node_id_to_hir_id[node_id]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -451,10 +451,6 @@ fn test_codegen_options_tracking_hash() {
|
||||||
opts.cg.prefer_dynamic = true;
|
opts.cg.prefer_dynamic = true;
|
||||||
assert!(reference.dep_tracking_hash() != opts.dep_tracking_hash());
|
assert!(reference.dep_tracking_hash() != opts.dep_tracking_hash());
|
||||||
|
|
||||||
opts = reference.clone();
|
|
||||||
opts.cg.no_integrated_as = true;
|
|
||||||
assert!(reference.dep_tracking_hash() != opts.dep_tracking_hash());
|
|
||||||
|
|
||||||
opts = reference.clone();
|
opts = reference.clone();
|
||||||
opts.cg.no_redzone = Some(true);
|
opts.cg.no_redzone = Some(true);
|
||||||
assert!(reference.dep_tracking_hash() != opts.dep_tracking_hash());
|
assert!(reference.dep_tracking_hash() != opts.dep_tracking_hash());
|
||||||
|
|
|
@ -644,7 +644,7 @@ pub fn check_unsafety(tcx: TyCtxt<'_>, def_id: DefId) {
|
||||||
}
|
}
|
||||||
|
|
||||||
let mut unsafe_blocks: Vec<_> = unsafe_blocks.iter().collect();
|
let mut unsafe_blocks: Vec<_> = unsafe_blocks.iter().collect();
|
||||||
unsafe_blocks.sort_by_cached_key(|(hir_id, _)| tcx.hir().hir_to_node_id(*hir_id));
|
unsafe_blocks.sort_by_cached_key(|(hir_id, _)| tcx.hir().hir_id_to_node_id(*hir_id));
|
||||||
let used_unsafe: FxHashSet<_> =
|
let used_unsafe: FxHashSet<_> =
|
||||||
unsafe_blocks.iter().flat_map(|&&(id, used)| used.then_some(id)).collect();
|
unsafe_blocks.iter().flat_map(|&&(id, used)| used.then_some(id)).collect();
|
||||||
for &(block_id, is_used) in unsafe_blocks {
|
for &(block_id, is_used) in unsafe_blocks {
|
||||||
|
|
|
@ -241,6 +241,7 @@ impl<'tcx> MatchVisitor<'_, 'tcx> {
|
||||||
}
|
}
|
||||||
|
|
||||||
adt_defined_here(cx, &mut err, pattern_ty, &witnesses);
|
adt_defined_here(cx, &mut err, pattern_ty, &witnesses);
|
||||||
|
err.note(&format!("the matched value is of type `{}`", pattern_ty));
|
||||||
err.emit();
|
err.emit();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -483,6 +484,7 @@ fn check_exhaustive<'p, 'tcx>(
|
||||||
"ensure that all possible cases are being handled, \
|
"ensure that all possible cases are being handled, \
|
||||||
possibly by adding wildcards or more match arms",
|
possibly by adding wildcards or more match arms",
|
||||||
);
|
);
|
||||||
|
err.note(&format!("the matched value is of type `{}`", scrut_ty));
|
||||||
err.emit();
|
err.emit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -225,7 +225,7 @@ impl<'l, 'tcx> DumpVisitor<'l, 'tcx> {
|
||||||
collector.visit_pat(&arg.pat);
|
collector.visit_pat(&arg.pat);
|
||||||
|
|
||||||
for (id, ident, ..) in collector.collected_idents {
|
for (id, ident, ..) in collector.collected_idents {
|
||||||
let hir_id = self.tcx.hir().node_to_hir_id(id);
|
let hir_id = self.tcx.hir().node_id_to_hir_id(id);
|
||||||
let typ = match self.save_ctxt.tables.node_type_opt(hir_id) {
|
let typ = match self.save_ctxt.tables.node_type_opt(hir_id) {
|
||||||
Some(s) => s.to_string(),
|
Some(s) => s.to_string(),
|
||||||
None => continue,
|
None => continue,
|
||||||
|
@ -268,7 +268,7 @@ impl<'l, 'tcx> DumpVisitor<'l, 'tcx> {
|
||||||
) {
|
) {
|
||||||
debug!("process_method: {}:{}", id, ident);
|
debug!("process_method: {}:{}", id, ident);
|
||||||
|
|
||||||
let hir_id = self.tcx.hir().node_to_hir_id(id);
|
let hir_id = self.tcx.hir().node_id_to_hir_id(id);
|
||||||
self.nest_tables(id, |v| {
|
self.nest_tables(id, |v| {
|
||||||
if let Some(mut method_data) = v.save_ctxt.get_method_data(id, ident, span) {
|
if let Some(mut method_data) = v.save_ctxt.get_method_data(id, ident, span) {
|
||||||
v.process_formals(&sig.decl.inputs, &method_data.qualname);
|
v.process_formals(&sig.decl.inputs, &method_data.qualname);
|
||||||
|
@ -308,7 +308,7 @@ impl<'l, 'tcx> DumpVisitor<'l, 'tcx> {
|
||||||
fn process_struct_field_def(&mut self, field: &ast::StructField, parent_id: NodeId) {
|
fn process_struct_field_def(&mut self, field: &ast::StructField, parent_id: NodeId) {
|
||||||
let field_data = self.save_ctxt.get_field_data(field, parent_id);
|
let field_data = self.save_ctxt.get_field_data(field, parent_id);
|
||||||
if let Some(field_data) = field_data {
|
if let Some(field_data) = field_data {
|
||||||
let hir_id = self.tcx.hir().node_to_hir_id(field.id);
|
let hir_id = self.tcx.hir().node_id_to_hir_id(field.id);
|
||||||
self.dumper.dump_def(&access_from!(self.save_ctxt, field, hir_id), field_data);
|
self.dumper.dump_def(&access_from!(self.save_ctxt, field, hir_id), field_data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -360,7 +360,7 @@ impl<'l, 'tcx> DumpVisitor<'l, 'tcx> {
|
||||||
ty_params: &'l ast::Generics,
|
ty_params: &'l ast::Generics,
|
||||||
body: Option<&'l ast::Block>,
|
body: Option<&'l ast::Block>,
|
||||||
) {
|
) {
|
||||||
let hir_id = self.tcx.hir().node_to_hir_id(item.id);
|
let hir_id = self.tcx.hir().node_id_to_hir_id(item.id);
|
||||||
self.nest_tables(item.id, |v| {
|
self.nest_tables(item.id, |v| {
|
||||||
if let Some(fn_data) = v.save_ctxt.get_item_data(item) {
|
if let Some(fn_data) = v.save_ctxt.get_item_data(item) {
|
||||||
down_cast_data!(fn_data, DefData, item.span);
|
down_cast_data!(fn_data, DefData, item.span);
|
||||||
|
@ -402,7 +402,7 @@ impl<'l, 'tcx> DumpVisitor<'l, 'tcx> {
|
||||||
typ: &'l ast::Ty,
|
typ: &'l ast::Ty,
|
||||||
expr: Option<&'l ast::Expr>,
|
expr: Option<&'l ast::Expr>,
|
||||||
) {
|
) {
|
||||||
let hir_id = self.tcx.hir().node_to_hir_id(item.id);
|
let hir_id = self.tcx.hir().node_id_to_hir_id(item.id);
|
||||||
self.nest_tables(item.id, |v| {
|
self.nest_tables(item.id, |v| {
|
||||||
if let Some(var_data) = v.save_ctxt.get_item_data(item) {
|
if let Some(var_data) = v.save_ctxt.get_item_data(item) {
|
||||||
down_cast_data!(var_data, DefData, item.span);
|
down_cast_data!(var_data, DefData, item.span);
|
||||||
|
@ -429,7 +429,7 @@ impl<'l, 'tcx> DumpVisitor<'l, 'tcx> {
|
||||||
if !self.span.filter_generated(ident.span) {
|
if !self.span.filter_generated(ident.span) {
|
||||||
let sig = sig::assoc_const_signature(id, ident.name, typ, expr, &self.save_ctxt);
|
let sig = sig::assoc_const_signature(id, ident.name, typ, expr, &self.save_ctxt);
|
||||||
let span = self.span_from_span(ident.span);
|
let span = self.span_from_span(ident.span);
|
||||||
let hir_id = self.tcx.hir().node_to_hir_id(id);
|
let hir_id = self.tcx.hir().node_id_to_hir_id(id);
|
||||||
|
|
||||||
self.dumper.dump_def(
|
self.dumper.dump_def(
|
||||||
&access_from_vis!(self.save_ctxt, vis, hir_id),
|
&access_from_vis!(self.save_ctxt, vis, hir_id),
|
||||||
|
@ -503,7 +503,7 @@ impl<'l, 'tcx> DumpVisitor<'l, 'tcx> {
|
||||||
|
|
||||||
if !self.span.filter_generated(item.ident.span) {
|
if !self.span.filter_generated(item.ident.span) {
|
||||||
let span = self.span_from_span(item.ident.span);
|
let span = self.span_from_span(item.ident.span);
|
||||||
let hir_id = self.tcx.hir().node_to_hir_id(item.id);
|
let hir_id = self.tcx.hir().node_id_to_hir_id(item.id);
|
||||||
self.dumper.dump_def(
|
self.dumper.dump_def(
|
||||||
&access_from!(self.save_ctxt, item, hir_id),
|
&access_from!(self.save_ctxt, item, hir_id),
|
||||||
Def {
|
Def {
|
||||||
|
@ -546,7 +546,7 @@ impl<'l, 'tcx> DumpVisitor<'l, 'tcx> {
|
||||||
};
|
};
|
||||||
down_cast_data!(enum_data, DefData, item.span);
|
down_cast_data!(enum_data, DefData, item.span);
|
||||||
|
|
||||||
let hir_id = self.tcx.hir().node_to_hir_id(item.id);
|
let hir_id = self.tcx.hir().node_id_to_hir_id(item.id);
|
||||||
let access = access_from!(self.save_ctxt, item, hir_id);
|
let access = access_from!(self.save_ctxt, item, hir_id);
|
||||||
|
|
||||||
for variant in &enum_definition.variants {
|
for variant in &enum_definition.variants {
|
||||||
|
@ -699,7 +699,7 @@ impl<'l, 'tcx> DumpVisitor<'l, 'tcx> {
|
||||||
let id = id_from_node_id(item.id, &self.save_ctxt);
|
let id = id_from_node_id(item.id, &self.save_ctxt);
|
||||||
let span = self.span_from_span(item.ident.span);
|
let span = self.span_from_span(item.ident.span);
|
||||||
let children = methods.iter().map(|i| id_from_node_id(i.id, &self.save_ctxt)).collect();
|
let children = methods.iter().map(|i| id_from_node_id(i.id, &self.save_ctxt)).collect();
|
||||||
let hir_id = self.tcx.hir().node_to_hir_id(item.id);
|
let hir_id = self.tcx.hir().node_id_to_hir_id(item.id);
|
||||||
self.dumper.dump_def(
|
self.dumper.dump_def(
|
||||||
&access_from!(self.save_ctxt, item, hir_id),
|
&access_from!(self.save_ctxt, item, hir_id),
|
||||||
Def {
|
Def {
|
||||||
|
@ -759,7 +759,7 @@ impl<'l, 'tcx> DumpVisitor<'l, 'tcx> {
|
||||||
fn process_mod(&mut self, item: &ast::Item) {
|
fn process_mod(&mut self, item: &ast::Item) {
|
||||||
if let Some(mod_data) = self.save_ctxt.get_item_data(item) {
|
if let Some(mod_data) = self.save_ctxt.get_item_data(item) {
|
||||||
down_cast_data!(mod_data, DefData, item.span);
|
down_cast_data!(mod_data, DefData, item.span);
|
||||||
let hir_id = self.tcx.hir().node_to_hir_id(item.id);
|
let hir_id = self.tcx.hir().node_id_to_hir_id(item.id);
|
||||||
self.dumper.dump_def(&access_from!(self.save_ctxt, item, hir_id), mod_data);
|
self.dumper.dump_def(&access_from!(self.save_ctxt, item, hir_id), mod_data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -864,7 +864,7 @@ impl<'l, 'tcx> DumpVisitor<'l, 'tcx> {
|
||||||
match p.kind {
|
match p.kind {
|
||||||
PatKind::Struct(ref _path, ref fields, _) => {
|
PatKind::Struct(ref _path, ref fields, _) => {
|
||||||
// FIXME do something with _path?
|
// FIXME do something with _path?
|
||||||
let hir_id = self.tcx.hir().node_to_hir_id(p.id);
|
let hir_id = self.tcx.hir().node_id_to_hir_id(p.id);
|
||||||
let adt = match self.save_ctxt.tables.node_type_opt(hir_id) {
|
let adt = match self.save_ctxt.tables.node_type_opt(hir_id) {
|
||||||
Some(ty) if ty.ty_adt_def().is_some() => ty.ty_adt_def().unwrap(),
|
Some(ty) if ty.ty_adt_def().is_some() => ty.ty_adt_def().unwrap(),
|
||||||
_ => {
|
_ => {
|
||||||
|
@ -903,7 +903,7 @@ impl<'l, 'tcx> DumpVisitor<'l, 'tcx> {
|
||||||
for (id, ident, _) in collector.collected_idents {
|
for (id, ident, _) in collector.collected_idents {
|
||||||
match self.save_ctxt.get_path_res(id) {
|
match self.save_ctxt.get_path_res(id) {
|
||||||
Res::Local(hir_id) => {
|
Res::Local(hir_id) => {
|
||||||
let id = self.tcx.hir().hir_to_node_id(hir_id);
|
let id = self.tcx.hir().hir_id_to_node_id(hir_id);
|
||||||
let typ = self
|
let typ = self
|
||||||
.save_ctxt
|
.save_ctxt
|
||||||
.tables
|
.tables
|
||||||
|
@ -1126,7 +1126,7 @@ impl<'l, 'tcx> DumpVisitor<'l, 'tcx> {
|
||||||
|
|
||||||
// The access is calculated using the current tree ID, but with the root tree's visibility
|
// The access is calculated using the current tree ID, but with the root tree's visibility
|
||||||
// (since nested trees don't have their own visibility).
|
// (since nested trees don't have their own visibility).
|
||||||
let hir_id = self.tcx.hir().node_to_hir_id(id);
|
let hir_id = self.tcx.hir().node_id_to_hir_id(id);
|
||||||
let access = access_from!(self.save_ctxt, root_item, hir_id);
|
let access = access_from!(self.save_ctxt, root_item, hir_id);
|
||||||
|
|
||||||
// The parent `DefId` of a given use tree is always the enclosing item.
|
// The parent `DefId` of a given use tree is always the enclosing item.
|
||||||
|
@ -1321,7 +1321,7 @@ impl<'l, 'tcx> Visitor<'l> for DumpVisitor<'l, 'tcx> {
|
||||||
if !self.span.filter_generated(item.ident.span) {
|
if !self.span.filter_generated(item.ident.span) {
|
||||||
let span = self.span_from_span(item.ident.span);
|
let span = self.span_from_span(item.ident.span);
|
||||||
let id = id_from_node_id(item.id, &self.save_ctxt);
|
let id = id_from_node_id(item.id, &self.save_ctxt);
|
||||||
let hir_id = self.tcx.hir().node_to_hir_id(item.id);
|
let hir_id = self.tcx.hir().node_id_to_hir_id(item.id);
|
||||||
|
|
||||||
self.dumper.dump_def(
|
self.dumper.dump_def(
|
||||||
&access_from!(self.save_ctxt, item, hir_id),
|
&access_from!(self.save_ctxt, item, hir_id),
|
||||||
|
@ -1420,7 +1420,7 @@ impl<'l, 'tcx> Visitor<'l> for DumpVisitor<'l, 'tcx> {
|
||||||
self.process_macro_use(ex.span);
|
self.process_macro_use(ex.span);
|
||||||
match ex.kind {
|
match ex.kind {
|
||||||
ast::ExprKind::Struct(ref path, ref fields, ref base) => {
|
ast::ExprKind::Struct(ref path, ref fields, ref base) => {
|
||||||
let expr_hir_id = self.save_ctxt.tcx.hir().node_to_hir_id(ex.id);
|
let expr_hir_id = self.save_ctxt.tcx.hir().node_id_to_hir_id(ex.id);
|
||||||
let hir_expr = self.save_ctxt.tcx.hir().expect_expr(expr_hir_id);
|
let hir_expr = self.save_ctxt.tcx.hir().expect_expr(expr_hir_id);
|
||||||
let adt = match self.save_ctxt.tables.expr_ty_opt(&hir_expr) {
|
let adt = match self.save_ctxt.tables.expr_ty_opt(&hir_expr) {
|
||||||
Some(ty) if ty.ty_adt_def().is_some() => ty.ty_adt_def().unwrap(),
|
Some(ty) if ty.ty_adt_def().is_some() => ty.ty_adt_def().unwrap(),
|
||||||
|
@ -1429,7 +1429,7 @@ impl<'l, 'tcx> Visitor<'l> for DumpVisitor<'l, 'tcx> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
let node_id = self.save_ctxt.tcx.hir().hir_to_node_id(hir_expr.hir_id);
|
let node_id = self.save_ctxt.tcx.hir().hir_id_to_node_id(hir_expr.hir_id);
|
||||||
let res = self.save_ctxt.get_path_res(node_id);
|
let res = self.save_ctxt.get_path_res(node_id);
|
||||||
self.process_struct_lit(ex, path, fields, adt.variant_of_res(res), base)
|
self.process_struct_lit(ex, path, fields, adt.variant_of_res(res), base)
|
||||||
}
|
}
|
||||||
|
@ -1514,7 +1514,7 @@ impl<'l, 'tcx> Visitor<'l> for DumpVisitor<'l, 'tcx> {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn visit_foreign_item(&mut self, item: &'l ast::ForeignItem) {
|
fn visit_foreign_item(&mut self, item: &'l ast::ForeignItem) {
|
||||||
let hir_id = self.tcx.hir().node_to_hir_id(item.id);
|
let hir_id = self.tcx.hir().node_id_to_hir_id(item.id);
|
||||||
let access = access_from!(self.save_ctxt, item, hir_id);
|
let access = access_from!(self.save_ctxt, item, hir_id);
|
||||||
|
|
||||||
match item.kind {
|
match item.kind {
|
||||||
|
|
|
@ -412,7 +412,7 @@ impl<'l, 'tcx> SaveContext<'l, 'tcx> {
|
||||||
let trait_id = self.tcx.trait_id_of_impl(impl_id);
|
let trait_id = self.tcx.trait_id_of_impl(impl_id);
|
||||||
let mut docs = String::new();
|
let mut docs = String::new();
|
||||||
let mut attrs = vec![];
|
let mut attrs = vec![];
|
||||||
if let Some(Node::ImplItem(item)) = hir.find(hir.node_to_hir_id(id)) {
|
if let Some(Node::ImplItem(item)) = hir.find(hir.node_id_to_hir_id(id)) {
|
||||||
docs = self.docs_for_attrs(&item.attrs);
|
docs = self.docs_for_attrs(&item.attrs);
|
||||||
attrs = item.attrs.to_vec();
|
attrs = item.attrs.to_vec();
|
||||||
}
|
}
|
||||||
|
@ -452,7 +452,7 @@ impl<'l, 'tcx> SaveContext<'l, 'tcx> {
|
||||||
Some(def_id) => {
|
Some(def_id) => {
|
||||||
let mut docs = String::new();
|
let mut docs = String::new();
|
||||||
let mut attrs = vec![];
|
let mut attrs = vec![];
|
||||||
let hir_id = self.tcx.hir().node_to_hir_id(id);
|
let hir_id = self.tcx.hir().node_id_to_hir_id(id);
|
||||||
|
|
||||||
if let Some(Node::TraitItem(item)) = self.tcx.hir().find(hir_id) {
|
if let Some(Node::TraitItem(item)) = self.tcx.hir().find(hir_id) {
|
||||||
docs = self.docs_for_attrs(&item.attrs);
|
docs = self.docs_for_attrs(&item.attrs);
|
||||||
|
@ -511,7 +511,7 @@ impl<'l, 'tcx> SaveContext<'l, 'tcx> {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn get_expr_data(&self, expr: &ast::Expr) -> Option<Data> {
|
pub fn get_expr_data(&self, expr: &ast::Expr) -> Option<Data> {
|
||||||
let expr_hir_id = self.tcx.hir().node_to_hir_id(expr.id);
|
let expr_hir_id = self.tcx.hir().node_id_to_hir_id(expr.id);
|
||||||
let hir_node = self.tcx.hir().expect_expr(expr_hir_id);
|
let hir_node = self.tcx.hir().expect_expr(expr_hir_id);
|
||||||
let ty = self.tables.expr_ty_adjusted_opt(&hir_node);
|
let ty = self.tables.expr_ty_adjusted_opt(&hir_node);
|
||||||
if ty.is_none() || ty.unwrap().kind == ty::Error {
|
if ty.is_none() || ty.unwrap().kind == ty::Error {
|
||||||
|
@ -519,7 +519,7 @@ impl<'l, 'tcx> SaveContext<'l, 'tcx> {
|
||||||
}
|
}
|
||||||
match expr.kind {
|
match expr.kind {
|
||||||
ast::ExprKind::Field(ref sub_ex, ident) => {
|
ast::ExprKind::Field(ref sub_ex, ident) => {
|
||||||
let sub_ex_hir_id = self.tcx.hir().node_to_hir_id(sub_ex.id);
|
let sub_ex_hir_id = self.tcx.hir().node_id_to_hir_id(sub_ex.id);
|
||||||
let hir_node = match self.tcx.hir().find(sub_ex_hir_id) {
|
let hir_node = match self.tcx.hir().find(sub_ex_hir_id) {
|
||||||
Some(Node::Expr(expr)) => expr,
|
Some(Node::Expr(expr)) => expr,
|
||||||
_ => {
|
_ => {
|
||||||
|
@ -573,7 +573,7 @@ impl<'l, 'tcx> SaveContext<'l, 'tcx> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ast::ExprKind::MethodCall(ref seg, ..) => {
|
ast::ExprKind::MethodCall(ref seg, ..) => {
|
||||||
let expr_hir_id = self.tcx.hir().definitions().node_to_hir_id(expr.id);
|
let expr_hir_id = self.tcx.hir().definitions().node_id_to_hir_id(expr.id);
|
||||||
let method_id = match self.tables.type_dependent_def_id(expr_hir_id) {
|
let method_id = match self.tables.type_dependent_def_id(expr_hir_id) {
|
||||||
Some(id) => id,
|
Some(id) => id,
|
||||||
None => {
|
None => {
|
||||||
|
@ -605,7 +605,7 @@ impl<'l, 'tcx> SaveContext<'l, 'tcx> {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn get_path_res(&self, id: NodeId) -> Res {
|
pub fn get_path_res(&self, id: NodeId) -> Res {
|
||||||
let hir_id = self.tcx.hir().node_to_hir_id(id);
|
let hir_id = self.tcx.hir().node_id_to_hir_id(id);
|
||||||
match self.tcx.hir().get(hir_id) {
|
match self.tcx.hir().get(hir_id) {
|
||||||
Node::TraitRef(tr) => tr.path.res,
|
Node::TraitRef(tr) => tr.path.res,
|
||||||
|
|
||||||
|
@ -619,7 +619,7 @@ impl<'l, 'tcx> SaveContext<'l, 'tcx> {
|
||||||
Some(res) if res != Res::Err => res,
|
Some(res) if res != Res::Err => res,
|
||||||
_ => {
|
_ => {
|
||||||
let parent_node = self.tcx.hir().get_parent_node(hir_id);
|
let parent_node = self.tcx.hir().get_parent_node(hir_id);
|
||||||
self.get_path_res(self.tcx.hir().hir_to_node_id(parent_node))
|
self.get_path_res(self.tcx.hir().hir_id_to_node_id(parent_node))
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -681,7 +681,7 @@ impl<'l, 'tcx> SaveContext<'l, 'tcx> {
|
||||||
Res::Local(id) => Some(Ref {
|
Res::Local(id) => Some(Ref {
|
||||||
kind: RefKind::Variable,
|
kind: RefKind::Variable,
|
||||||
span,
|
span,
|
||||||
ref_id: id_from_node_id(self.tcx.hir().hir_to_node_id(id), self),
|
ref_id: id_from_node_id(self.tcx.hir().hir_id_to_node_id(id), self),
|
||||||
}),
|
}),
|
||||||
Res::Def(HirDefKind::Trait, def_id) if fn_type(path_seg) => {
|
Res::Def(HirDefKind::Trait, def_id) if fn_type(path_seg) => {
|
||||||
Some(Ref { kind: RefKind::Type, span, ref_id: id_from_def_id(def_id) })
|
Some(Ref { kind: RefKind::Type, span, ref_id: id_from_def_id(def_id) })
|
||||||
|
|
|
@ -665,8 +665,6 @@ options! {CodegenOptions, CodegenSetter, basic_codegen_options,
|
||||||
"use soft float ABI (*eabihf targets only)"),
|
"use soft float ABI (*eabihf targets only)"),
|
||||||
prefer_dynamic: bool = (false, parse_bool, [TRACKED],
|
prefer_dynamic: bool = (false, parse_bool, [TRACKED],
|
||||||
"prefer dynamic linking to static linking"),
|
"prefer dynamic linking to static linking"),
|
||||||
no_integrated_as: bool = (false, parse_bool, [TRACKED],
|
|
||||||
"use an external assembler rather than LLVM's integrated one"),
|
|
||||||
no_redzone: Option<bool> = (None, parse_opt_bool, [TRACKED],
|
no_redzone: Option<bool> = (None, parse_opt_bool, [TRACKED],
|
||||||
"disable the use of the redzone"),
|
"disable the use of the redzone"),
|
||||||
relocation_model: Option<String> = (None, parse_opt_string, [TRACKED],
|
relocation_model: Option<String> = (None, parse_opt_string, [TRACKED],
|
||||||
|
|
|
@ -712,11 +712,6 @@ pub struct TargetOptions {
|
||||||
// will 'just work'.
|
// will 'just work'.
|
||||||
pub obj_is_bitcode: bool,
|
pub obj_is_bitcode: bool,
|
||||||
|
|
||||||
// LLVM can't produce object files for this target. Instead, we'll make LLVM
|
|
||||||
// emit assembly and then use `gcc` to turn that assembly into an object
|
|
||||||
// file
|
|
||||||
pub no_integrated_as: bool,
|
|
||||||
|
|
||||||
/// Don't use this field; instead use the `.min_atomic_width()` method.
|
/// Don't use this field; instead use the `.min_atomic_width()` method.
|
||||||
pub min_atomic_width: Option<u64>,
|
pub min_atomic_width: Option<u64>,
|
||||||
|
|
||||||
|
@ -872,7 +867,6 @@ impl Default for TargetOptions {
|
||||||
allow_asm: true,
|
allow_asm: true,
|
||||||
has_elf_tls: false,
|
has_elf_tls: false,
|
||||||
obj_is_bitcode: false,
|
obj_is_bitcode: false,
|
||||||
no_integrated_as: false,
|
|
||||||
min_atomic_width: None,
|
min_atomic_width: None,
|
||||||
max_atomic_width: None,
|
max_atomic_width: None,
|
||||||
atomic_cas: true,
|
atomic_cas: true,
|
||||||
|
@ -1187,7 +1181,6 @@ impl Target {
|
||||||
key!(main_needs_argc_argv, bool);
|
key!(main_needs_argc_argv, bool);
|
||||||
key!(has_elf_tls, bool);
|
key!(has_elf_tls, bool);
|
||||||
key!(obj_is_bitcode, bool);
|
key!(obj_is_bitcode, bool);
|
||||||
key!(no_integrated_as, bool);
|
|
||||||
key!(max_atomic_width, Option<u64>);
|
key!(max_atomic_width, Option<u64>);
|
||||||
key!(min_atomic_width, Option<u64>);
|
key!(min_atomic_width, Option<u64>);
|
||||||
key!(atomic_cas, bool);
|
key!(atomic_cas, bool);
|
||||||
|
@ -1415,7 +1408,6 @@ impl ToJson for Target {
|
||||||
target_option_val!(main_needs_argc_argv);
|
target_option_val!(main_needs_argc_argv);
|
||||||
target_option_val!(has_elf_tls);
|
target_option_val!(has_elf_tls);
|
||||||
target_option_val!(obj_is_bitcode);
|
target_option_val!(obj_is_bitcode);
|
||||||
target_option_val!(no_integrated_as);
|
|
||||||
target_option_val!(min_atomic_width);
|
target_option_val!(min_atomic_width);
|
||||||
target_option_val!(max_atomic_width);
|
target_option_val!(max_atomic_width);
|
||||||
target_option_val!(atomic_cas);
|
target_option_val!(atomic_cas);
|
||||||
|
|
|
@ -22,7 +22,6 @@ pub fn target() -> TargetResult {
|
||||||
// dependency on this specific gcc.
|
// dependency on this specific gcc.
|
||||||
asm_args: vec!["-mcpu=msp430".to_string()],
|
asm_args: vec!["-mcpu=msp430".to_string()],
|
||||||
linker: Some("msp430-elf-gcc".to_string()),
|
linker: Some("msp430-elf-gcc".to_string()),
|
||||||
no_integrated_as: true,
|
|
||||||
|
|
||||||
// There are no atomic CAS instructions available in the MSP430
|
// There are no atomic CAS instructions available in the MSP430
|
||||||
// instruction set, and the LLVM backend doesn't currently support
|
// instruction set, and the LLVM backend doesn't currently support
|
||||||
|
|
|
@ -216,93 +216,87 @@ pub(super) fn type_of(tcx: TyCtxt<'_>, def_id: DefId) -> Ty<'_> {
|
||||||
| Node::Expr(&Expr { kind: ExprKind::Path(_), .. })
|
| Node::Expr(&Expr { kind: ExprKind::Path(_), .. })
|
||||||
| Node::TraitRef(..) => {
|
| Node::TraitRef(..) => {
|
||||||
let path = match parent_node {
|
let path = match parent_node {
|
||||||
Node::Ty(&Ty {
|
Node::Ty(&Ty { kind: TyKind::Path(QPath::Resolved(_, path)), .. })
|
||||||
kind: TyKind::Path(QPath::Resolved(_, ref path)), ..
|
|
||||||
})
|
|
||||||
| Node::Expr(&Expr {
|
| Node::Expr(&Expr {
|
||||||
kind: ExprKind::Path(QPath::Resolved(_, ref path)),
|
kind:
|
||||||
|
ExprKind::Path(QPath::Resolved(_, path))
|
||||||
|
| ExprKind::Struct(&QPath::Resolved(_, path), ..),
|
||||||
..
|
..
|
||||||
}) => Some(&**path),
|
})
|
||||||
Node::Expr(&Expr { kind: ExprKind::Struct(ref path, ..), .. }) => {
|
| Node::TraitRef(&TraitRef { path, .. }) => &*path,
|
||||||
if let QPath::Resolved(_, ref path) = **path {
|
_ => {
|
||||||
Some(&**path)
|
tcx.sess.delay_span_bug(
|
||||||
} else {
|
DUMMY_SP,
|
||||||
None
|
&format!("unexpected const parent path {:?}", parent_node),
|
||||||
}
|
);
|
||||||
|
return tcx.types.err;
|
||||||
}
|
}
|
||||||
Node::TraitRef(&TraitRef { ref path, .. }) => Some(&**path),
|
|
||||||
_ => None,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
if let Some(path) = path {
|
// We've encountered an `AnonConst` in some path, so we need to
|
||||||
// We've encountered an `AnonConst` in some path, so we need to
|
// figure out which generic parameter it corresponds to and return
|
||||||
// figure out which generic parameter it corresponds to and return
|
// the relevant type.
|
||||||
// the relevant type.
|
|
||||||
|
|
||||||
let (arg_index, segment) = path
|
let (arg_index, segment) = path
|
||||||
.segments
|
.segments
|
||||||
.iter()
|
.iter()
|
||||||
.filter_map(|seg| seg.args.as_ref().map(|args| (args.args, seg)))
|
.filter_map(|seg| seg.args.as_ref().map(|args| (args.args, seg)))
|
||||||
.find_map(|(args, seg)| {
|
.find_map(|(args, seg)| {
|
||||||
args.iter()
|
args.iter()
|
||||||
.filter(|arg| arg.is_const())
|
.filter(|arg| arg.is_const())
|
||||||
.enumerate()
|
.enumerate()
|
||||||
.filter(|(_, arg)| arg.id() == hir_id)
|
.filter(|(_, arg)| arg.id() == hir_id)
|
||||||
.map(|(index, _)| (index, seg))
|
.map(|(index, _)| (index, seg))
|
||||||
.next()
|
.next()
|
||||||
})
|
})
|
||||||
.unwrap_or_else(|| {
|
.unwrap_or_else(|| {
|
||||||
bug!("no arg matching AnonConst in path");
|
bug!("no arg matching AnonConst in path");
|
||||||
});
|
});
|
||||||
|
|
||||||
// Try to use the segment resolution if it is valid, otherwise we
|
// Try to use the segment resolution if it is valid, otherwise we
|
||||||
// default to the path resolution.
|
// default to the path resolution.
|
||||||
let res = segment.res.filter(|&r| r != Res::Err).unwrap_or(path.res);
|
let res = segment.res.filter(|&r| r != Res::Err).unwrap_or(path.res);
|
||||||
let generics = match res {
|
let generics = match res {
|
||||||
Res::Def(DefKind::Ctor(..), def_id) => {
|
Res::Def(DefKind::Ctor(..), def_id) => {
|
||||||
tcx.generics_of(tcx.parent(def_id).unwrap())
|
tcx.generics_of(tcx.parent(def_id).unwrap())
|
||||||
|
}
|
||||||
|
Res::Def(_, def_id) => tcx.generics_of(def_id),
|
||||||
|
res => {
|
||||||
|
tcx.sess.delay_span_bug(
|
||||||
|
DUMMY_SP,
|
||||||
|
&format!(
|
||||||
|
"unexpected anon const res {:?} in path: {:?}",
|
||||||
|
res, path,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
return tcx.types.err;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
let ty = generics
|
||||||
|
.params
|
||||||
|
.iter()
|
||||||
|
.filter(|param| {
|
||||||
|
if let ty::GenericParamDefKind::Const = param.kind {
|
||||||
|
true
|
||||||
|
} else {
|
||||||
|
false
|
||||||
}
|
}
|
||||||
Res::Def(_, def_id) => tcx.generics_of(def_id),
|
})
|
||||||
res => {
|
.nth(arg_index)
|
||||||
tcx.sess.delay_span_bug(
|
.map(|param| tcx.type_of(param.def_id));
|
||||||
DUMMY_SP,
|
|
||||||
&format!(
|
|
||||||
"unexpected anon const res {:?} in path: {:?}",
|
|
||||||
res, path,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
return tcx.types.err;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
generics
|
if let Some(ty) = ty {
|
||||||
.params
|
ty
|
||||||
.iter()
|
|
||||||
.filter(|param| {
|
|
||||||
if let ty::GenericParamDefKind::Const = param.kind {
|
|
||||||
true
|
|
||||||
} else {
|
|
||||||
false
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.nth(arg_index)
|
|
||||||
.map(|param| tcx.type_of(param.def_id))
|
|
||||||
// This is no generic parameter associated with the arg. This is
|
|
||||||
// probably from an extra arg where one is not needed.
|
|
||||||
.unwrap_or_else(|| {
|
|
||||||
tcx.sess.delay_span_bug(
|
|
||||||
DUMMY_SP,
|
|
||||||
&format!(
|
|
||||||
"missing generic parameter for `AnonConst`, parent: {:?}, res: {:?}",
|
|
||||||
parent_node, res
|
|
||||||
),
|
|
||||||
);
|
|
||||||
tcx.types.err
|
|
||||||
})
|
|
||||||
} else {
|
} else {
|
||||||
|
// This is no generic parameter associated with the arg. This is
|
||||||
|
// probably from an extra arg where one is not needed.
|
||||||
tcx.sess.delay_span_bug(
|
tcx.sess.delay_span_bug(
|
||||||
DUMMY_SP,
|
DUMMY_SP,
|
||||||
&format!("unexpected const parent path {:?}", parent_node,),
|
&format!(
|
||||||
|
"missing generic parameter for `AnonConst`, parent: {:?}, res: {:?}",
|
||||||
|
parent_node, res
|
||||||
|
),
|
||||||
);
|
);
|
||||||
tcx.types.err
|
tcx.types.err
|
||||||
}
|
}
|
||||||
|
|
|
@ -135,7 +135,7 @@ impl<'a, 'tcx> LinkCollector<'a, 'tcx> {
|
||||||
|
|
||||||
// In case we're in a module, try to resolve the relative path.
|
// In case we're in a module, try to resolve the relative path.
|
||||||
if let Some(module_id) = parent_id.or(self.mod_ids.last().cloned()) {
|
if let Some(module_id) = parent_id.or(self.mod_ids.last().cloned()) {
|
||||||
let module_id = cx.tcx.hir().hir_to_node_id(module_id);
|
let module_id = cx.tcx.hir().hir_id_to_node_id(module_id);
|
||||||
let result = cx.enter_resolver(|resolver| {
|
let result = cx.enter_resolver(|resolver| {
|
||||||
resolver.resolve_str_path_error(DUMMY_SP, &path_str, ns, module_id)
|
resolver.resolve_str_path_error(DUMMY_SP, &path_str, ns, module_id)
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,8 +0,0 @@
|
||||||
-include ../tools.mk
|
|
||||||
|
|
||||||
# only-linux
|
|
||||||
# only-x86_64
|
|
||||||
|
|
||||||
all:
|
|
||||||
$(RUSTC) hello.rs -C no_integrated_as
|
|
||||||
$(call RUN,hello)
|
|
|
@ -1,3 +0,0 @@
|
||||||
fn main() {
|
|
||||||
println!("Hello, world!");
|
|
||||||
}
|
|
|
@ -6,6 +6,7 @@ LL | A = { let 0 = 0; 0 },
|
||||||
|
|
|
|
||||||
= note: `let` bindings require an "irrefutable pattern", like a `struct` or an `enum` with only one variant
|
= note: `let` bindings require an "irrefutable pattern", like a `struct` or an `enum` with only one variant
|
||||||
= note: for more information, visit https://doc.rust-lang.org/book/ch18-02-refutability.html
|
= note: for more information, visit https://doc.rust-lang.org/book/ch18-02-refutability.html
|
||||||
|
= note: the matched value is of type `i32`
|
||||||
help: you might want to use `if let` to ignore the variant that isn't matched
|
help: you might want to use `if let` to ignore the variant that isn't matched
|
||||||
|
|
|
|
||||||
LL | A = { if let 0 = 0 { /* */ } 0 },
|
LL | A = { if let 0 = 0 { /* */ } 0 },
|
||||||
|
|
|
@ -6,6 +6,7 @@ LL | let x: [i32; { let 0 = 0; 0 }] = [];
|
||||||
|
|
|
|
||||||
= note: `let` bindings require an "irrefutable pattern", like a `struct` or an `enum` with only one variant
|
= note: `let` bindings require an "irrefutable pattern", like a `struct` or an `enum` with only one variant
|
||||||
= note: for more information, visit https://doc.rust-lang.org/book/ch18-02-refutability.html
|
= note: for more information, visit https://doc.rust-lang.org/book/ch18-02-refutability.html
|
||||||
|
= note: the matched value is of type `i32`
|
||||||
help: you might want to use `if let` to ignore the variant that isn't matched
|
help: you might want to use `if let` to ignore the variant that isn't matched
|
||||||
|
|
|
|
||||||
LL | let x: [i32; { if let 0 = 0 { /* */ } 0 }] = [];
|
LL | let x: [i32; { if let 0 = 0 { /* */ } 0 }] = [];
|
||||||
|
|
|
@ -6,6 +6,7 @@ LL | const X: i32 = { let 0 = 0; 0 };
|
||||||
|
|
|
|
||||||
= note: `let` bindings require an "irrefutable pattern", like a `struct` or an `enum` with only one variant
|
= note: `let` bindings require an "irrefutable pattern", like a `struct` or an `enum` with only one variant
|
||||||
= note: for more information, visit https://doc.rust-lang.org/book/ch18-02-refutability.html
|
= note: for more information, visit https://doc.rust-lang.org/book/ch18-02-refutability.html
|
||||||
|
= note: the matched value is of type `i32`
|
||||||
help: you might want to use `if let` to ignore the variant that isn't matched
|
help: you might want to use `if let` to ignore the variant that isn't matched
|
||||||
|
|
|
|
||||||
LL | const X: i32 = { if let 0 = 0 { /* */ } 0 };
|
LL | const X: i32 = { if let 0 = 0 { /* */ } 0 };
|
||||||
|
@ -19,6 +20,7 @@ LL | static Y: i32 = { let 0 = 0; 0 };
|
||||||
|
|
|
|
||||||
= note: `let` bindings require an "irrefutable pattern", like a `struct` or an `enum` with only one variant
|
= note: `let` bindings require an "irrefutable pattern", like a `struct` or an `enum` with only one variant
|
||||||
= note: for more information, visit https://doc.rust-lang.org/book/ch18-02-refutability.html
|
= note: for more information, visit https://doc.rust-lang.org/book/ch18-02-refutability.html
|
||||||
|
= note: the matched value is of type `i32`
|
||||||
help: you might want to use `if let` to ignore the variant that isn't matched
|
help: you might want to use `if let` to ignore the variant that isn't matched
|
||||||
|
|
|
|
||||||
LL | static Y: i32 = { if let 0 = 0 { /* */ } 0 };
|
LL | static Y: i32 = { if let 0 = 0 { /* */ } 0 };
|
||||||
|
@ -32,6 +34,7 @@ LL | const X: i32 = { let 0 = 0; 0 };
|
||||||
|
|
|
|
||||||
= note: `let` bindings require an "irrefutable pattern", like a `struct` or an `enum` with only one variant
|
= note: `let` bindings require an "irrefutable pattern", like a `struct` or an `enum` with only one variant
|
||||||
= note: for more information, visit https://doc.rust-lang.org/book/ch18-02-refutability.html
|
= note: for more information, visit https://doc.rust-lang.org/book/ch18-02-refutability.html
|
||||||
|
= note: the matched value is of type `i32`
|
||||||
help: you might want to use `if let` to ignore the variant that isn't matched
|
help: you might want to use `if let` to ignore the variant that isn't matched
|
||||||
|
|
|
|
||||||
LL | const X: i32 = { if let 0 = 0 { /* */ } 0 };
|
LL | const X: i32 = { if let 0 = 0 { /* */ } 0 };
|
||||||
|
@ -45,6 +48,7 @@ LL | const X: i32 = { let 0 = 0; 0 };
|
||||||
|
|
|
|
||||||
= note: `let` bindings require an "irrefutable pattern", like a `struct` or an `enum` with only one variant
|
= note: `let` bindings require an "irrefutable pattern", like a `struct` or an `enum` with only one variant
|
||||||
= note: for more information, visit https://doc.rust-lang.org/book/ch18-02-refutability.html
|
= note: for more information, visit https://doc.rust-lang.org/book/ch18-02-refutability.html
|
||||||
|
= note: the matched value is of type `i32`
|
||||||
help: you might want to use `if let` to ignore the variant that isn't matched
|
help: you might want to use `if let` to ignore the variant that isn't matched
|
||||||
|
|
|
|
||||||
LL | const X: i32 = { if let 0 = 0 { /* */ } 0 };
|
LL | const X: i32 = { if let 0 = 0 { /* */ } 0 };
|
||||||
|
|
|
@ -9,6 +9,8 @@ LL | let a = 4;
|
||||||
| |
|
| |
|
||||||
| interpreted as a constant pattern, not a new variable
|
| interpreted as a constant pattern, not a new variable
|
||||||
| help: introduce a variable instead: `a_var`
|
| help: introduce a variable instead: `a_var`
|
||||||
|
|
|
||||||
|
= note: the matched value is of type `u8`
|
||||||
|
|
||||||
error[E0005]: refutable pattern in local binding: `0u8..=1u8` and `3u8..=std::u8::MAX` not covered
|
error[E0005]: refutable pattern in local binding: `0u8..=1u8` and `3u8..=std::u8::MAX` not covered
|
||||||
--> $DIR/const-pattern-irrefutable.rs:13:9
|
--> $DIR/const-pattern-irrefutable.rs:13:9
|
||||||
|
@ -21,6 +23,8 @@ LL | let c = 4;
|
||||||
| |
|
| |
|
||||||
| interpreted as a constant pattern, not a new variable
|
| interpreted as a constant pattern, not a new variable
|
||||||
| help: introduce a variable instead: `c_var`
|
| help: introduce a variable instead: `c_var`
|
||||||
|
|
|
||||||
|
= note: the matched value is of type `u8`
|
||||||
|
|
||||||
error[E0005]: refutable pattern in local binding: `0u8..=1u8` and `3u8..=std::u8::MAX` not covered
|
error[E0005]: refutable pattern in local binding: `0u8..=1u8` and `3u8..=std::u8::MAX` not covered
|
||||||
--> $DIR/const-pattern-irrefutable.rs:14:9
|
--> $DIR/const-pattern-irrefutable.rs:14:9
|
||||||
|
@ -33,6 +37,8 @@ LL | let d = 4;
|
||||||
| |
|
| |
|
||||||
| interpreted as a constant pattern, not a new variable
|
| interpreted as a constant pattern, not a new variable
|
||||||
| help: introduce a variable instead: `d_var`
|
| help: introduce a variable instead: `d_var`
|
||||||
|
|
|
||||||
|
= note: the matched value is of type `u8`
|
||||||
|
|
||||||
error: aborting due to 3 previous errors
|
error: aborting due to 3 previous errors
|
||||||
|
|
||||||
|
|
|
@ -3,6 +3,8 @@ error[E0005]: refutable pattern in function argument: `&[]`, `&[_]` and `&[_, _,
|
||||||
|
|
|
|
||||||
LL | const fn slice(&[a, b]: &[i32]) -> i32 {
|
LL | const fn slice(&[a, b]: &[i32]) -> i32 {
|
||||||
| ^^^^^^^ patterns `&[]`, `&[_]` and `&[_, _, _, ..]` not covered
|
| ^^^^^^^ patterns `&[]`, `&[_]` and `&[_, _, _, ..]` not covered
|
||||||
|
|
|
||||||
|
= note: the matched value is of type `&[i32]`
|
||||||
|
|
||||||
error[E0723]: loops and conditional expressions are not stable in const fn
|
error[E0723]: loops and conditional expressions are not stable in const fn
|
||||||
--> $DIR/const_let_refutable.rs:3:17
|
--> $DIR/const_let_refutable.rs:3:17
|
||||||
|
|
|
@ -14,6 +14,7 @@ LL | match K {
|
||||||
| ^ pattern `&T` not covered
|
| ^ pattern `&T` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `&T`
|
||||||
|
|
||||||
error: to use a constant of type `S` in a pattern, `S` must be annotated with `#[derive(PartialEq, Eq)]`
|
error: to use a constant of type `S` in a pattern, `S` must be annotated with `#[derive(PartialEq, Eq)]`
|
||||||
--> $DIR/match_ice.rs:11:9
|
--> $DIR/match_ice.rs:11:9
|
||||||
|
|
|
@ -14,6 +14,7 @@ LL | let Helper::U(u) = Helper::T(t, []);
|
||||||
|
|
|
|
||||||
= note: `let` bindings require an "irrefutable pattern", like a `struct` or an `enum` with only one variant
|
= note: `let` bindings require an "irrefutable pattern", like a `struct` or an `enum` with only one variant
|
||||||
= note: for more information, visit https://doc.rust-lang.org/book/ch18-02-refutability.html
|
= note: for more information, visit https://doc.rust-lang.org/book/ch18-02-refutability.html
|
||||||
|
= note: the matched value is of type `Helper<T, U>`
|
||||||
help: you might want to use `if let` to ignore the variant that isn't matched
|
help: you might want to use `if let` to ignore the variant that isn't matched
|
||||||
|
|
|
|
||||||
LL | if let Helper::U(u) = Helper::T(t, []) { /* */ }
|
LL | if let Helper::U(u) = Helper::T(t, []) { /* */ }
|
||||||
|
|
|
@ -13,6 +13,7 @@ LL | Some(#[stable(feature = "rust1", since = "1.0.0")] T),
|
||||||
| ---- not covered
|
| ---- not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `std::option::Option<i32>`
|
||||||
|
|
||||||
error: aborting due to previous error
|
error: aborting due to previous error
|
||||||
|
|
||||||
|
|
|
@ -12,6 +12,7 @@ LL | match x {
|
||||||
| ^ pattern `HastaLaVistaBaby` not covered
|
| ^ pattern `HastaLaVistaBaby` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `Terminator`
|
||||||
|
|
||||||
error: aborting due to previous error
|
error: aborting due to previous error
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,7 @@ LL | None,
|
||||||
|
|
|
|
||||||
= note: `let` bindings require an "irrefutable pattern", like a `struct` or an `enum` with only one variant
|
= note: `let` bindings require an "irrefutable pattern", like a `struct` or an `enum` with only one variant
|
||||||
= note: for more information, visit https://doc.rust-lang.org/book/ch18-02-refutability.html
|
= note: for more information, visit https://doc.rust-lang.org/book/ch18-02-refutability.html
|
||||||
|
= note: the matched value is of type `std::option::Option<i32>`
|
||||||
help: you might want to use `if let` to ignore the variant that isn't matched
|
help: you might want to use `if let` to ignore the variant that isn't matched
|
||||||
|
|
|
|
||||||
LL | if let Some(y) = x { /* */ }
|
LL | if let Some(y) = x { /* */ }
|
||||||
|
|
|
@ -8,6 +8,8 @@ LL | for Some(x) in xs {}
|
||||||
|
|
|
|
||||||
LL | None,
|
LL | None,
|
||||||
| ---- not covered
|
| ---- not covered
|
||||||
|
|
|
||||||
|
= note: the matched value is of type `std::option::Option<i32>`
|
||||||
|
|
||||||
error: aborting due to previous error
|
error: aborting due to previous error
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,7 @@ LL | Err(#[stable(feature = "rust1", since = "1.0.0")] E),
|
||||||
|
|
|
|
||||||
= note: `let` bindings require an "irrefutable pattern", like a `struct` or an `enum` with only one variant
|
= note: `let` bindings require an "irrefutable pattern", like a `struct` or an `enum` with only one variant
|
||||||
= note: for more information, visit https://doc.rust-lang.org/book/ch18-02-refutability.html
|
= note: for more information, visit https://doc.rust-lang.org/book/ch18-02-refutability.html
|
||||||
|
= note: the matched value is of type `std::result::Result<u32, !>`
|
||||||
help: you might want to use `if let` to ignore the variant that isn't matched
|
help: you might want to use `if let` to ignore the variant that isn't matched
|
||||||
|
|
|
|
||||||
LL | if let Ok(_x) = foo() { /* */ }
|
LL | if let Ok(_x) = foo() { /* */ }
|
||||||
|
|
|
@ -5,6 +5,7 @@ LL | match 0usize {
|
||||||
| ^^^^^^ pattern `_` not covered
|
| ^^^^^^ pattern `_` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `usize`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `_` not covered
|
error[E0004]: non-exhaustive patterns: `_` not covered
|
||||||
--> $DIR/feature-gate-precise_pointer_size_matching.rs:10:11
|
--> $DIR/feature-gate-precise_pointer_size_matching.rs:10:11
|
||||||
|
@ -13,6 +14,7 @@ LL | match 0isize {
|
||||||
| ^^^^^^ pattern `_` not covered
|
| ^^^^^^ pattern `_` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `isize`
|
||||||
|
|
||||||
error: aborting due to 2 previous errors
|
error: aborting due to 2 previous errors
|
||||||
|
|
||||||
|
|
|
@ -3,6 +3,8 @@ error[E0005]: refutable pattern in `for` loop binding: `&std::i32::MIN..=0i32` a
|
||||||
|
|
|
|
||||||
LL | for &1 in [1].iter() {}
|
LL | for &1 in [1].iter() {}
|
||||||
| ^^ patterns `&std::i32::MIN..=0i32` and `&2i32..=std::i32::MAX` not covered
|
| ^^ patterns `&std::i32::MIN..=0i32` and `&2i32..=std::i32::MAX` not covered
|
||||||
|
|
|
||||||
|
= note: the matched value is of type `&i32`
|
||||||
|
|
||||||
error: aborting due to previous error
|
error: aborting due to previous error
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,7 @@ LL | m!(0f32, core::f32::NEG_INFINITY..);
|
||||||
| ^^^^ pattern `_` not covered
|
| ^^^^ pattern `_` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `f32`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `_` not covered
|
error[E0004]: non-exhaustive patterns: `_` not covered
|
||||||
--> $DIR/half-open-range-pats-exhaustive-fail.rs:17:8
|
--> $DIR/half-open-range-pats-exhaustive-fail.rs:17:8
|
||||||
|
@ -13,6 +14,7 @@ LL | m!(0f32, ..core::f32::INFINITY);
|
||||||
| ^^^^ pattern `_` not covered
|
| ^^^^ pattern `_` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `f32`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `'\u{10ffff}'` not covered
|
error[E0004]: non-exhaustive patterns: `'\u{10ffff}'` not covered
|
||||||
--> $DIR/half-open-range-pats-exhaustive-fail.rs:26:8
|
--> $DIR/half-open-range-pats-exhaustive-fail.rs:26:8
|
||||||
|
@ -21,6 +23,7 @@ LL | m!('a', ..core::char::MAX);
|
||||||
| ^^^ pattern `'\u{10ffff}'` not covered
|
| ^^^ pattern `'\u{10ffff}'` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `char`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `'\u{10fffe}'..='\u{10ffff}'` not covered
|
error[E0004]: non-exhaustive patterns: `'\u{10fffe}'..='\u{10ffff}'` not covered
|
||||||
--> $DIR/half-open-range-pats-exhaustive-fail.rs:27:8
|
--> $DIR/half-open-range-pats-exhaustive-fail.rs:27:8
|
||||||
|
@ -29,6 +32,7 @@ LL | m!('a', ..ALMOST_MAX);
|
||||||
| ^^^ pattern `'\u{10fffe}'..='\u{10ffff}'` not covered
|
| ^^^ pattern `'\u{10fffe}'..='\u{10ffff}'` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `char`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `'\u{0}'` not covered
|
error[E0004]: non-exhaustive patterns: `'\u{0}'` not covered
|
||||||
--> $DIR/half-open-range-pats-exhaustive-fail.rs:28:8
|
--> $DIR/half-open-range-pats-exhaustive-fail.rs:28:8
|
||||||
|
@ -37,6 +41,7 @@ LL | m!('a', ALMOST_MIN..);
|
||||||
| ^^^ pattern `'\u{0}'` not covered
|
| ^^^ pattern `'\u{0}'` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `char`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `'\u{10ffff}'` not covered
|
error[E0004]: non-exhaustive patterns: `'\u{10ffff}'` not covered
|
||||||
--> $DIR/half-open-range-pats-exhaustive-fail.rs:29:8
|
--> $DIR/half-open-range-pats-exhaustive-fail.rs:29:8
|
||||||
|
@ -45,6 +50,7 @@ LL | m!('a', ..=ALMOST_MAX);
|
||||||
| ^^^ pattern `'\u{10ffff}'` not covered
|
| ^^^ pattern `'\u{10ffff}'` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `char`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `'b'` not covered
|
error[E0004]: non-exhaustive patterns: `'b'` not covered
|
||||||
--> $DIR/half-open-range-pats-exhaustive-fail.rs:30:8
|
--> $DIR/half-open-range-pats-exhaustive-fail.rs:30:8
|
||||||
|
@ -53,6 +59,7 @@ LL | m!('a', ..=VAL | VAL_2..);
|
||||||
| ^^^ pattern `'b'` not covered
|
| ^^^ pattern `'b'` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `char`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `'b'` not covered
|
error[E0004]: non-exhaustive patterns: `'b'` not covered
|
||||||
--> $DIR/half-open-range-pats-exhaustive-fail.rs:31:8
|
--> $DIR/half-open-range-pats-exhaustive-fail.rs:31:8
|
||||||
|
@ -61,6 +68,7 @@ LL | m!('a', ..VAL_1 | VAL_2..);
|
||||||
| ^^^ pattern `'b'` not covered
|
| ^^^ pattern `'b'` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `char`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `std::u8::MAX` not covered
|
error[E0004]: non-exhaustive patterns: `std::u8::MAX` not covered
|
||||||
--> $DIR/half-open-range-pats-exhaustive-fail.rs:41:12
|
--> $DIR/half-open-range-pats-exhaustive-fail.rs:41:12
|
||||||
|
@ -69,6 +77,7 @@ LL | m!(0, ..core::u8::MAX);
|
||||||
| ^ pattern `std::u8::MAX` not covered
|
| ^ pattern `std::u8::MAX` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `u8`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `254u8..=std::u8::MAX` not covered
|
error[E0004]: non-exhaustive patterns: `254u8..=std::u8::MAX` not covered
|
||||||
--> $DIR/half-open-range-pats-exhaustive-fail.rs:42:12
|
--> $DIR/half-open-range-pats-exhaustive-fail.rs:42:12
|
||||||
|
@ -77,6 +86,7 @@ LL | m!(0, ..ALMOST_MAX);
|
||||||
| ^ pattern `254u8..=std::u8::MAX` not covered
|
| ^ pattern `254u8..=std::u8::MAX` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `u8`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `0u8` not covered
|
error[E0004]: non-exhaustive patterns: `0u8` not covered
|
||||||
--> $DIR/half-open-range-pats-exhaustive-fail.rs:43:12
|
--> $DIR/half-open-range-pats-exhaustive-fail.rs:43:12
|
||||||
|
@ -85,6 +95,7 @@ LL | m!(0, ALMOST_MIN..);
|
||||||
| ^ pattern `0u8` not covered
|
| ^ pattern `0u8` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `u8`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `std::u8::MAX` not covered
|
error[E0004]: non-exhaustive patterns: `std::u8::MAX` not covered
|
||||||
--> $DIR/half-open-range-pats-exhaustive-fail.rs:44:12
|
--> $DIR/half-open-range-pats-exhaustive-fail.rs:44:12
|
||||||
|
@ -93,6 +104,7 @@ LL | m!(0, ..=ALMOST_MAX);
|
||||||
| ^ pattern `std::u8::MAX` not covered
|
| ^ pattern `std::u8::MAX` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `u8`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `43u8` not covered
|
error[E0004]: non-exhaustive patterns: `43u8` not covered
|
||||||
--> $DIR/half-open-range-pats-exhaustive-fail.rs:45:12
|
--> $DIR/half-open-range-pats-exhaustive-fail.rs:45:12
|
||||||
|
@ -101,6 +113,7 @@ LL | m!(0, ..=VAL | VAL_2..);
|
||||||
| ^ pattern `43u8` not covered
|
| ^ pattern `43u8` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `u8`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `43u8` not covered
|
error[E0004]: non-exhaustive patterns: `43u8` not covered
|
||||||
--> $DIR/half-open-range-pats-exhaustive-fail.rs:46:12
|
--> $DIR/half-open-range-pats-exhaustive-fail.rs:46:12
|
||||||
|
@ -109,6 +122,7 @@ LL | m!(0, ..VAL_1 | VAL_2..);
|
||||||
| ^ pattern `43u8` not covered
|
| ^ pattern `43u8` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `u8`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `std::u16::MAX` not covered
|
error[E0004]: non-exhaustive patterns: `std::u16::MAX` not covered
|
||||||
--> $DIR/half-open-range-pats-exhaustive-fail.rs:54:12
|
--> $DIR/half-open-range-pats-exhaustive-fail.rs:54:12
|
||||||
|
@ -117,6 +131,7 @@ LL | m!(0, ..core::u16::MAX);
|
||||||
| ^ pattern `std::u16::MAX` not covered
|
| ^ pattern `std::u16::MAX` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `u16`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `65534u16..=std::u16::MAX` not covered
|
error[E0004]: non-exhaustive patterns: `65534u16..=std::u16::MAX` not covered
|
||||||
--> $DIR/half-open-range-pats-exhaustive-fail.rs:55:12
|
--> $DIR/half-open-range-pats-exhaustive-fail.rs:55:12
|
||||||
|
@ -125,6 +140,7 @@ LL | m!(0, ..ALMOST_MAX);
|
||||||
| ^ pattern `65534u16..=std::u16::MAX` not covered
|
| ^ pattern `65534u16..=std::u16::MAX` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `u16`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `0u16` not covered
|
error[E0004]: non-exhaustive patterns: `0u16` not covered
|
||||||
--> $DIR/half-open-range-pats-exhaustive-fail.rs:56:12
|
--> $DIR/half-open-range-pats-exhaustive-fail.rs:56:12
|
||||||
|
@ -133,6 +149,7 @@ LL | m!(0, ALMOST_MIN..);
|
||||||
| ^ pattern `0u16` not covered
|
| ^ pattern `0u16` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `u16`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `std::u16::MAX` not covered
|
error[E0004]: non-exhaustive patterns: `std::u16::MAX` not covered
|
||||||
--> $DIR/half-open-range-pats-exhaustive-fail.rs:57:12
|
--> $DIR/half-open-range-pats-exhaustive-fail.rs:57:12
|
||||||
|
@ -141,6 +158,7 @@ LL | m!(0, ..=ALMOST_MAX);
|
||||||
| ^ pattern `std::u16::MAX` not covered
|
| ^ pattern `std::u16::MAX` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `u16`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `43u16` not covered
|
error[E0004]: non-exhaustive patterns: `43u16` not covered
|
||||||
--> $DIR/half-open-range-pats-exhaustive-fail.rs:58:12
|
--> $DIR/half-open-range-pats-exhaustive-fail.rs:58:12
|
||||||
|
@ -149,6 +167,7 @@ LL | m!(0, ..=VAL | VAL_2..);
|
||||||
| ^ pattern `43u16` not covered
|
| ^ pattern `43u16` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `u16`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `43u16` not covered
|
error[E0004]: non-exhaustive patterns: `43u16` not covered
|
||||||
--> $DIR/half-open-range-pats-exhaustive-fail.rs:59:12
|
--> $DIR/half-open-range-pats-exhaustive-fail.rs:59:12
|
||||||
|
@ -157,6 +176,7 @@ LL | m!(0, ..VAL_1 | VAL_2..);
|
||||||
| ^ pattern `43u16` not covered
|
| ^ pattern `43u16` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `u16`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `std::u32::MAX` not covered
|
error[E0004]: non-exhaustive patterns: `std::u32::MAX` not covered
|
||||||
--> $DIR/half-open-range-pats-exhaustive-fail.rs:67:12
|
--> $DIR/half-open-range-pats-exhaustive-fail.rs:67:12
|
||||||
|
@ -165,6 +185,7 @@ LL | m!(0, ..core::u32::MAX);
|
||||||
| ^ pattern `std::u32::MAX` not covered
|
| ^ pattern `std::u32::MAX` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `u32`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `4294967294u32..=std::u32::MAX` not covered
|
error[E0004]: non-exhaustive patterns: `4294967294u32..=std::u32::MAX` not covered
|
||||||
--> $DIR/half-open-range-pats-exhaustive-fail.rs:68:12
|
--> $DIR/half-open-range-pats-exhaustive-fail.rs:68:12
|
||||||
|
@ -173,6 +194,7 @@ LL | m!(0, ..ALMOST_MAX);
|
||||||
| ^ pattern `4294967294u32..=std::u32::MAX` not covered
|
| ^ pattern `4294967294u32..=std::u32::MAX` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `u32`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `0u32` not covered
|
error[E0004]: non-exhaustive patterns: `0u32` not covered
|
||||||
--> $DIR/half-open-range-pats-exhaustive-fail.rs:69:12
|
--> $DIR/half-open-range-pats-exhaustive-fail.rs:69:12
|
||||||
|
@ -181,6 +203,7 @@ LL | m!(0, ALMOST_MIN..);
|
||||||
| ^ pattern `0u32` not covered
|
| ^ pattern `0u32` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `u32`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `std::u32::MAX` not covered
|
error[E0004]: non-exhaustive patterns: `std::u32::MAX` not covered
|
||||||
--> $DIR/half-open-range-pats-exhaustive-fail.rs:70:12
|
--> $DIR/half-open-range-pats-exhaustive-fail.rs:70:12
|
||||||
|
@ -189,6 +212,7 @@ LL | m!(0, ..=ALMOST_MAX);
|
||||||
| ^ pattern `std::u32::MAX` not covered
|
| ^ pattern `std::u32::MAX` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `u32`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `43u32` not covered
|
error[E0004]: non-exhaustive patterns: `43u32` not covered
|
||||||
--> $DIR/half-open-range-pats-exhaustive-fail.rs:71:12
|
--> $DIR/half-open-range-pats-exhaustive-fail.rs:71:12
|
||||||
|
@ -197,6 +221,7 @@ LL | m!(0, ..=VAL | VAL_2..);
|
||||||
| ^ pattern `43u32` not covered
|
| ^ pattern `43u32` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `u32`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `43u32` not covered
|
error[E0004]: non-exhaustive patterns: `43u32` not covered
|
||||||
--> $DIR/half-open-range-pats-exhaustive-fail.rs:72:12
|
--> $DIR/half-open-range-pats-exhaustive-fail.rs:72:12
|
||||||
|
@ -205,6 +230,7 @@ LL | m!(0, ..VAL_1 | VAL_2..);
|
||||||
| ^ pattern `43u32` not covered
|
| ^ pattern `43u32` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `u32`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `std::u64::MAX` not covered
|
error[E0004]: non-exhaustive patterns: `std::u64::MAX` not covered
|
||||||
--> $DIR/half-open-range-pats-exhaustive-fail.rs:80:12
|
--> $DIR/half-open-range-pats-exhaustive-fail.rs:80:12
|
||||||
|
@ -213,6 +239,7 @@ LL | m!(0, ..core::u64::MAX);
|
||||||
| ^ pattern `std::u64::MAX` not covered
|
| ^ pattern `std::u64::MAX` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `u64`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `18446744073709551614u64..=std::u64::MAX` not covered
|
error[E0004]: non-exhaustive patterns: `18446744073709551614u64..=std::u64::MAX` not covered
|
||||||
--> $DIR/half-open-range-pats-exhaustive-fail.rs:81:12
|
--> $DIR/half-open-range-pats-exhaustive-fail.rs:81:12
|
||||||
|
@ -221,6 +248,7 @@ LL | m!(0, ..ALMOST_MAX);
|
||||||
| ^ pattern `18446744073709551614u64..=std::u64::MAX` not covered
|
| ^ pattern `18446744073709551614u64..=std::u64::MAX` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `u64`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `0u64` not covered
|
error[E0004]: non-exhaustive patterns: `0u64` not covered
|
||||||
--> $DIR/half-open-range-pats-exhaustive-fail.rs:82:12
|
--> $DIR/half-open-range-pats-exhaustive-fail.rs:82:12
|
||||||
|
@ -229,6 +257,7 @@ LL | m!(0, ALMOST_MIN..);
|
||||||
| ^ pattern `0u64` not covered
|
| ^ pattern `0u64` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `u64`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `std::u64::MAX` not covered
|
error[E0004]: non-exhaustive patterns: `std::u64::MAX` not covered
|
||||||
--> $DIR/half-open-range-pats-exhaustive-fail.rs:83:12
|
--> $DIR/half-open-range-pats-exhaustive-fail.rs:83:12
|
||||||
|
@ -237,6 +266,7 @@ LL | m!(0, ..=ALMOST_MAX);
|
||||||
| ^ pattern `std::u64::MAX` not covered
|
| ^ pattern `std::u64::MAX` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `u64`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `43u64` not covered
|
error[E0004]: non-exhaustive patterns: `43u64` not covered
|
||||||
--> $DIR/half-open-range-pats-exhaustive-fail.rs:84:12
|
--> $DIR/half-open-range-pats-exhaustive-fail.rs:84:12
|
||||||
|
@ -245,6 +275,7 @@ LL | m!(0, ..=VAL | VAL_2..);
|
||||||
| ^ pattern `43u64` not covered
|
| ^ pattern `43u64` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `u64`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `43u64` not covered
|
error[E0004]: non-exhaustive patterns: `43u64` not covered
|
||||||
--> $DIR/half-open-range-pats-exhaustive-fail.rs:85:12
|
--> $DIR/half-open-range-pats-exhaustive-fail.rs:85:12
|
||||||
|
@ -253,6 +284,7 @@ LL | m!(0, ..VAL_1 | VAL_2..);
|
||||||
| ^ pattern `43u64` not covered
|
| ^ pattern `43u64` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `u64`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `std::u128::MAX` not covered
|
error[E0004]: non-exhaustive patterns: `std::u128::MAX` not covered
|
||||||
--> $DIR/half-open-range-pats-exhaustive-fail.rs:93:12
|
--> $DIR/half-open-range-pats-exhaustive-fail.rs:93:12
|
||||||
|
@ -261,6 +293,7 @@ LL | m!(0, ..core::u128::MAX);
|
||||||
| ^ pattern `std::u128::MAX` not covered
|
| ^ pattern `std::u128::MAX` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `u128`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `340282366920938463463374607431768211454u128..=std::u128::MAX` not covered
|
error[E0004]: non-exhaustive patterns: `340282366920938463463374607431768211454u128..=std::u128::MAX` not covered
|
||||||
--> $DIR/half-open-range-pats-exhaustive-fail.rs:94:12
|
--> $DIR/half-open-range-pats-exhaustive-fail.rs:94:12
|
||||||
|
@ -269,6 +302,7 @@ LL | m!(0, ..ALMOST_MAX);
|
||||||
| ^ pattern `340282366920938463463374607431768211454u128..=std::u128::MAX` not covered
|
| ^ pattern `340282366920938463463374607431768211454u128..=std::u128::MAX` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `u128`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `0u128` not covered
|
error[E0004]: non-exhaustive patterns: `0u128` not covered
|
||||||
--> $DIR/half-open-range-pats-exhaustive-fail.rs:95:12
|
--> $DIR/half-open-range-pats-exhaustive-fail.rs:95:12
|
||||||
|
@ -277,6 +311,7 @@ LL | m!(0, ALMOST_MIN..);
|
||||||
| ^ pattern `0u128` not covered
|
| ^ pattern `0u128` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `u128`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `std::u128::MAX` not covered
|
error[E0004]: non-exhaustive patterns: `std::u128::MAX` not covered
|
||||||
--> $DIR/half-open-range-pats-exhaustive-fail.rs:96:12
|
--> $DIR/half-open-range-pats-exhaustive-fail.rs:96:12
|
||||||
|
@ -285,6 +320,7 @@ LL | m!(0, ..=ALMOST_MAX);
|
||||||
| ^ pattern `std::u128::MAX` not covered
|
| ^ pattern `std::u128::MAX` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `u128`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `43u128` not covered
|
error[E0004]: non-exhaustive patterns: `43u128` not covered
|
||||||
--> $DIR/half-open-range-pats-exhaustive-fail.rs:97:12
|
--> $DIR/half-open-range-pats-exhaustive-fail.rs:97:12
|
||||||
|
@ -293,6 +329,7 @@ LL | m!(0, ..=VAL | VAL_2..);
|
||||||
| ^ pattern `43u128` not covered
|
| ^ pattern `43u128` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `u128`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `43u128` not covered
|
error[E0004]: non-exhaustive patterns: `43u128` not covered
|
||||||
--> $DIR/half-open-range-pats-exhaustive-fail.rs:98:12
|
--> $DIR/half-open-range-pats-exhaustive-fail.rs:98:12
|
||||||
|
@ -301,6 +338,7 @@ LL | m!(0, ..VAL_1 | VAL_2..);
|
||||||
| ^ pattern `43u128` not covered
|
| ^ pattern `43u128` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `u128`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `std::i8::MAX` not covered
|
error[E0004]: non-exhaustive patterns: `std::i8::MAX` not covered
|
||||||
--> $DIR/half-open-range-pats-exhaustive-fail.rs:109:12
|
--> $DIR/half-open-range-pats-exhaustive-fail.rs:109:12
|
||||||
|
@ -309,6 +347,7 @@ LL | m!(0, ..core::i8::MAX);
|
||||||
| ^ pattern `std::i8::MAX` not covered
|
| ^ pattern `std::i8::MAX` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `i8`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `126i8..=std::i8::MAX` not covered
|
error[E0004]: non-exhaustive patterns: `126i8..=std::i8::MAX` not covered
|
||||||
--> $DIR/half-open-range-pats-exhaustive-fail.rs:110:12
|
--> $DIR/half-open-range-pats-exhaustive-fail.rs:110:12
|
||||||
|
@ -317,6 +356,7 @@ LL | m!(0, ..ALMOST_MAX);
|
||||||
| ^ pattern `126i8..=std::i8::MAX` not covered
|
| ^ pattern `126i8..=std::i8::MAX` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `i8`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `std::i8::MIN` not covered
|
error[E0004]: non-exhaustive patterns: `std::i8::MIN` not covered
|
||||||
--> $DIR/half-open-range-pats-exhaustive-fail.rs:111:12
|
--> $DIR/half-open-range-pats-exhaustive-fail.rs:111:12
|
||||||
|
@ -325,6 +365,7 @@ LL | m!(0, ALMOST_MIN..);
|
||||||
| ^ pattern `std::i8::MIN` not covered
|
| ^ pattern `std::i8::MIN` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `i8`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `std::i8::MAX` not covered
|
error[E0004]: non-exhaustive patterns: `std::i8::MAX` not covered
|
||||||
--> $DIR/half-open-range-pats-exhaustive-fail.rs:112:12
|
--> $DIR/half-open-range-pats-exhaustive-fail.rs:112:12
|
||||||
|
@ -333,6 +374,7 @@ LL | m!(0, ..=ALMOST_MAX);
|
||||||
| ^ pattern `std::i8::MAX` not covered
|
| ^ pattern `std::i8::MAX` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `i8`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `43i8` not covered
|
error[E0004]: non-exhaustive patterns: `43i8` not covered
|
||||||
--> $DIR/half-open-range-pats-exhaustive-fail.rs:113:12
|
--> $DIR/half-open-range-pats-exhaustive-fail.rs:113:12
|
||||||
|
@ -341,6 +383,7 @@ LL | m!(0, ..=VAL | VAL_2..);
|
||||||
| ^ pattern `43i8` not covered
|
| ^ pattern `43i8` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `i8`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `43i8` not covered
|
error[E0004]: non-exhaustive patterns: `43i8` not covered
|
||||||
--> $DIR/half-open-range-pats-exhaustive-fail.rs:114:12
|
--> $DIR/half-open-range-pats-exhaustive-fail.rs:114:12
|
||||||
|
@ -349,6 +392,7 @@ LL | m!(0, ..VAL_1 | VAL_2..);
|
||||||
| ^ pattern `43i8` not covered
|
| ^ pattern `43i8` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `i8`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `std::i16::MAX` not covered
|
error[E0004]: non-exhaustive patterns: `std::i16::MAX` not covered
|
||||||
--> $DIR/half-open-range-pats-exhaustive-fail.rs:122:12
|
--> $DIR/half-open-range-pats-exhaustive-fail.rs:122:12
|
||||||
|
@ -357,6 +401,7 @@ LL | m!(0, ..core::i16::MAX);
|
||||||
| ^ pattern `std::i16::MAX` not covered
|
| ^ pattern `std::i16::MAX` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `i16`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `32766i16..=std::i16::MAX` not covered
|
error[E0004]: non-exhaustive patterns: `32766i16..=std::i16::MAX` not covered
|
||||||
--> $DIR/half-open-range-pats-exhaustive-fail.rs:123:12
|
--> $DIR/half-open-range-pats-exhaustive-fail.rs:123:12
|
||||||
|
@ -365,6 +410,7 @@ LL | m!(0, ..ALMOST_MAX);
|
||||||
| ^ pattern `32766i16..=std::i16::MAX` not covered
|
| ^ pattern `32766i16..=std::i16::MAX` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `i16`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `std::i16::MIN` not covered
|
error[E0004]: non-exhaustive patterns: `std::i16::MIN` not covered
|
||||||
--> $DIR/half-open-range-pats-exhaustive-fail.rs:124:12
|
--> $DIR/half-open-range-pats-exhaustive-fail.rs:124:12
|
||||||
|
@ -373,6 +419,7 @@ LL | m!(0, ALMOST_MIN..);
|
||||||
| ^ pattern `std::i16::MIN` not covered
|
| ^ pattern `std::i16::MIN` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `i16`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `std::i16::MAX` not covered
|
error[E0004]: non-exhaustive patterns: `std::i16::MAX` not covered
|
||||||
--> $DIR/half-open-range-pats-exhaustive-fail.rs:125:12
|
--> $DIR/half-open-range-pats-exhaustive-fail.rs:125:12
|
||||||
|
@ -381,6 +428,7 @@ LL | m!(0, ..=ALMOST_MAX);
|
||||||
| ^ pattern `std::i16::MAX` not covered
|
| ^ pattern `std::i16::MAX` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `i16`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `43i16` not covered
|
error[E0004]: non-exhaustive patterns: `43i16` not covered
|
||||||
--> $DIR/half-open-range-pats-exhaustive-fail.rs:126:12
|
--> $DIR/half-open-range-pats-exhaustive-fail.rs:126:12
|
||||||
|
@ -389,6 +437,7 @@ LL | m!(0, ..=VAL | VAL_2..);
|
||||||
| ^ pattern `43i16` not covered
|
| ^ pattern `43i16` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `i16`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `43i16` not covered
|
error[E0004]: non-exhaustive patterns: `43i16` not covered
|
||||||
--> $DIR/half-open-range-pats-exhaustive-fail.rs:127:12
|
--> $DIR/half-open-range-pats-exhaustive-fail.rs:127:12
|
||||||
|
@ -397,6 +446,7 @@ LL | m!(0, ..VAL_1 | VAL_2..);
|
||||||
| ^ pattern `43i16` not covered
|
| ^ pattern `43i16` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `i16`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `std::i32::MAX` not covered
|
error[E0004]: non-exhaustive patterns: `std::i32::MAX` not covered
|
||||||
--> $DIR/half-open-range-pats-exhaustive-fail.rs:135:12
|
--> $DIR/half-open-range-pats-exhaustive-fail.rs:135:12
|
||||||
|
@ -405,6 +455,7 @@ LL | m!(0, ..core::i32::MAX);
|
||||||
| ^ pattern `std::i32::MAX` not covered
|
| ^ pattern `std::i32::MAX` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `i32`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `2147483646i32..=std::i32::MAX` not covered
|
error[E0004]: non-exhaustive patterns: `2147483646i32..=std::i32::MAX` not covered
|
||||||
--> $DIR/half-open-range-pats-exhaustive-fail.rs:136:12
|
--> $DIR/half-open-range-pats-exhaustive-fail.rs:136:12
|
||||||
|
@ -413,6 +464,7 @@ LL | m!(0, ..ALMOST_MAX);
|
||||||
| ^ pattern `2147483646i32..=std::i32::MAX` not covered
|
| ^ pattern `2147483646i32..=std::i32::MAX` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `i32`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `std::i32::MIN` not covered
|
error[E0004]: non-exhaustive patterns: `std::i32::MIN` not covered
|
||||||
--> $DIR/half-open-range-pats-exhaustive-fail.rs:137:12
|
--> $DIR/half-open-range-pats-exhaustive-fail.rs:137:12
|
||||||
|
@ -421,6 +473,7 @@ LL | m!(0, ALMOST_MIN..);
|
||||||
| ^ pattern `std::i32::MIN` not covered
|
| ^ pattern `std::i32::MIN` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `i32`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `std::i32::MAX` not covered
|
error[E0004]: non-exhaustive patterns: `std::i32::MAX` not covered
|
||||||
--> $DIR/half-open-range-pats-exhaustive-fail.rs:138:12
|
--> $DIR/half-open-range-pats-exhaustive-fail.rs:138:12
|
||||||
|
@ -429,6 +482,7 @@ LL | m!(0, ..=ALMOST_MAX);
|
||||||
| ^ pattern `std::i32::MAX` not covered
|
| ^ pattern `std::i32::MAX` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `i32`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `43i32` not covered
|
error[E0004]: non-exhaustive patterns: `43i32` not covered
|
||||||
--> $DIR/half-open-range-pats-exhaustive-fail.rs:139:12
|
--> $DIR/half-open-range-pats-exhaustive-fail.rs:139:12
|
||||||
|
@ -437,6 +491,7 @@ LL | m!(0, ..=VAL | VAL_2..);
|
||||||
| ^ pattern `43i32` not covered
|
| ^ pattern `43i32` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `i32`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `43i32` not covered
|
error[E0004]: non-exhaustive patterns: `43i32` not covered
|
||||||
--> $DIR/half-open-range-pats-exhaustive-fail.rs:140:12
|
--> $DIR/half-open-range-pats-exhaustive-fail.rs:140:12
|
||||||
|
@ -445,6 +500,7 @@ LL | m!(0, ..VAL_1 | VAL_2..);
|
||||||
| ^ pattern `43i32` not covered
|
| ^ pattern `43i32` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `i32`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `std::i64::MAX` not covered
|
error[E0004]: non-exhaustive patterns: `std::i64::MAX` not covered
|
||||||
--> $DIR/half-open-range-pats-exhaustive-fail.rs:148:12
|
--> $DIR/half-open-range-pats-exhaustive-fail.rs:148:12
|
||||||
|
@ -453,6 +509,7 @@ LL | m!(0, ..core::i64::MAX);
|
||||||
| ^ pattern `std::i64::MAX` not covered
|
| ^ pattern `std::i64::MAX` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `i64`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `9223372036854775806i64..=std::i64::MAX` not covered
|
error[E0004]: non-exhaustive patterns: `9223372036854775806i64..=std::i64::MAX` not covered
|
||||||
--> $DIR/half-open-range-pats-exhaustive-fail.rs:149:12
|
--> $DIR/half-open-range-pats-exhaustive-fail.rs:149:12
|
||||||
|
@ -461,6 +518,7 @@ LL | m!(0, ..ALMOST_MAX);
|
||||||
| ^ pattern `9223372036854775806i64..=std::i64::MAX` not covered
|
| ^ pattern `9223372036854775806i64..=std::i64::MAX` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `i64`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `std::i64::MIN` not covered
|
error[E0004]: non-exhaustive patterns: `std::i64::MIN` not covered
|
||||||
--> $DIR/half-open-range-pats-exhaustive-fail.rs:150:12
|
--> $DIR/half-open-range-pats-exhaustive-fail.rs:150:12
|
||||||
|
@ -469,6 +527,7 @@ LL | m!(0, ALMOST_MIN..);
|
||||||
| ^ pattern `std::i64::MIN` not covered
|
| ^ pattern `std::i64::MIN` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `i64`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `std::i64::MAX` not covered
|
error[E0004]: non-exhaustive patterns: `std::i64::MAX` not covered
|
||||||
--> $DIR/half-open-range-pats-exhaustive-fail.rs:151:12
|
--> $DIR/half-open-range-pats-exhaustive-fail.rs:151:12
|
||||||
|
@ -477,6 +536,7 @@ LL | m!(0, ..=ALMOST_MAX);
|
||||||
| ^ pattern `std::i64::MAX` not covered
|
| ^ pattern `std::i64::MAX` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `i64`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `43i64` not covered
|
error[E0004]: non-exhaustive patterns: `43i64` not covered
|
||||||
--> $DIR/half-open-range-pats-exhaustive-fail.rs:152:12
|
--> $DIR/half-open-range-pats-exhaustive-fail.rs:152:12
|
||||||
|
@ -485,6 +545,7 @@ LL | m!(0, ..=VAL | VAL_2..);
|
||||||
| ^ pattern `43i64` not covered
|
| ^ pattern `43i64` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `i64`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `43i64` not covered
|
error[E0004]: non-exhaustive patterns: `43i64` not covered
|
||||||
--> $DIR/half-open-range-pats-exhaustive-fail.rs:153:12
|
--> $DIR/half-open-range-pats-exhaustive-fail.rs:153:12
|
||||||
|
@ -493,6 +554,7 @@ LL | m!(0, ..VAL_1 | VAL_2..);
|
||||||
| ^ pattern `43i64` not covered
|
| ^ pattern `43i64` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `i64`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `std::i128::MAX` not covered
|
error[E0004]: non-exhaustive patterns: `std::i128::MAX` not covered
|
||||||
--> $DIR/half-open-range-pats-exhaustive-fail.rs:161:12
|
--> $DIR/half-open-range-pats-exhaustive-fail.rs:161:12
|
||||||
|
@ -501,6 +563,7 @@ LL | m!(0, ..core::i128::MAX);
|
||||||
| ^ pattern `std::i128::MAX` not covered
|
| ^ pattern `std::i128::MAX` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `i128`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `170141183460469231731687303715884105726i128..=std::i128::MAX` not covered
|
error[E0004]: non-exhaustive patterns: `170141183460469231731687303715884105726i128..=std::i128::MAX` not covered
|
||||||
--> $DIR/half-open-range-pats-exhaustive-fail.rs:162:12
|
--> $DIR/half-open-range-pats-exhaustive-fail.rs:162:12
|
||||||
|
@ -509,6 +572,7 @@ LL | m!(0, ..ALMOST_MAX);
|
||||||
| ^ pattern `170141183460469231731687303715884105726i128..=std::i128::MAX` not covered
|
| ^ pattern `170141183460469231731687303715884105726i128..=std::i128::MAX` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `i128`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `std::i128::MIN` not covered
|
error[E0004]: non-exhaustive patterns: `std::i128::MIN` not covered
|
||||||
--> $DIR/half-open-range-pats-exhaustive-fail.rs:163:12
|
--> $DIR/half-open-range-pats-exhaustive-fail.rs:163:12
|
||||||
|
@ -517,6 +581,7 @@ LL | m!(0, ALMOST_MIN..);
|
||||||
| ^ pattern `std::i128::MIN` not covered
|
| ^ pattern `std::i128::MIN` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `i128`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `std::i128::MAX` not covered
|
error[E0004]: non-exhaustive patterns: `std::i128::MAX` not covered
|
||||||
--> $DIR/half-open-range-pats-exhaustive-fail.rs:164:12
|
--> $DIR/half-open-range-pats-exhaustive-fail.rs:164:12
|
||||||
|
@ -525,6 +590,7 @@ LL | m!(0, ..=ALMOST_MAX);
|
||||||
| ^ pattern `std::i128::MAX` not covered
|
| ^ pattern `std::i128::MAX` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `i128`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `43i128` not covered
|
error[E0004]: non-exhaustive patterns: `43i128` not covered
|
||||||
--> $DIR/half-open-range-pats-exhaustive-fail.rs:165:12
|
--> $DIR/half-open-range-pats-exhaustive-fail.rs:165:12
|
||||||
|
@ -533,6 +599,7 @@ LL | m!(0, ..=VAL | VAL_2..);
|
||||||
| ^ pattern `43i128` not covered
|
| ^ pattern `43i128` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `i128`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `43i128` not covered
|
error[E0004]: non-exhaustive patterns: `43i128` not covered
|
||||||
--> $DIR/half-open-range-pats-exhaustive-fail.rs:166:12
|
--> $DIR/half-open-range-pats-exhaustive-fail.rs:166:12
|
||||||
|
@ -541,6 +608,7 @@ LL | m!(0, ..VAL_1 | VAL_2..);
|
||||||
| ^ pattern `43i128` not covered
|
| ^ pattern `43i128` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `i128`
|
||||||
|
|
||||||
error: aborting due to 68 previous errors
|
error: aborting due to 68 previous errors
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,7 @@ LL | match (T::T1(()), V::V2(true)) {
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^ pattern `(T1(()), V2(_))` not covered
|
| ^^^^^^^^^^^^^^^^^^^^^^^^ pattern `(T1(()), V2(_))` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `(T, V)`
|
||||||
|
|
||||||
error: aborting due to previous error
|
error: aborting due to previous error
|
||||||
|
|
||||||
|
|
|
@ -3,6 +3,8 @@ error[E0005]: refutable pattern in `for` loop binding: `&[]`, `&[_]`, `&[_, _]`
|
||||||
|
|
|
|
||||||
LL | for &[x,y,z] in values.chunks(3).filter(|&xs| xs.len() == 3) {
|
LL | for &[x,y,z] in values.chunks(3).filter(|&xs| xs.len() == 3) {
|
||||||
| ^^^^^^^^ patterns `&[]`, `&[_]`, `&[_, _]` and 1 more not covered
|
| ^^^^^^^^ patterns `&[]`, `&[_]`, `&[_, _]` and 1 more not covered
|
||||||
|
|
|
||||||
|
= note: the matched value is of type `&[u8]`
|
||||||
|
|
||||||
error: aborting due to previous error
|
error: aborting due to previous error
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,7 @@ LL | match (a,b) {
|
||||||
| ^^^^^ pattern `(None, None)` not covered
|
| ^^^^^ pattern `(None, None)` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `(std::option::Option<usize>, std::option::Option<usize>)`
|
||||||
|
|
||||||
error: aborting due to previous error
|
error: aborting due to previous error
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,7 @@ LL | match "world" {
|
||||||
| ^^^^^^^ pattern `&_` not covered
|
| ^^^^^^^ pattern `&_` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `&str`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `&_` not covered
|
error[E0004]: non-exhaustive patterns: `&_` not covered
|
||||||
--> $DIR/issue-30240.rs:6:11
|
--> $DIR/issue-30240.rs:6:11
|
||||||
|
@ -13,6 +14,7 @@ LL | match "world" {
|
||||||
| ^^^^^^^ pattern `&_` not covered
|
| ^^^^^^^ pattern `&_` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `&str`
|
||||||
|
|
||||||
error: aborting due to 2 previous errors
|
error: aborting due to 2 previous errors
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,7 @@ LL | match () { }
|
||||||
| ^^
|
| ^^
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `()`
|
||||||
|
|
||||||
error: aborting due to previous error
|
error: aborting due to previous error
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,7 @@ LL | match x { }
|
||||||
| ^
|
| ^
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `*const Bottom`
|
||||||
|
|
||||||
error: aborting due to previous error
|
error: aborting due to previous error
|
||||||
|
|
||||||
|
|
|
@ -15,6 +15,7 @@ LL | let Thing::Foo(y) = Thing::Foo(1);
|
||||||
|
|
|
|
||||||
= note: `let` bindings require an "irrefutable pattern", like a `struct` or an `enum` with only one variant
|
= note: `let` bindings require an "irrefutable pattern", like a `struct` or an `enum` with only one variant
|
||||||
= note: for more information, visit https://doc.rust-lang.org/book/ch18-02-refutability.html
|
= note: for more information, visit https://doc.rust-lang.org/book/ch18-02-refutability.html
|
||||||
|
= note: the matched value is of type `Thing`
|
||||||
help: you might want to use `if let` to ignore the variant that isn't matched
|
help: you might want to use `if let` to ignore the variant that isn't matched
|
||||||
|
|
|
|
||||||
LL | if let Thing::Foo(y) = Thing::Foo(1) { /* */ }
|
LL | if let Thing::Foo(y) = Thing::Foo(1) { /* */ }
|
||||||
|
|
|
@ -5,6 +5,7 @@ LL | box NodeKind::Element(ed) => match ed.kind {
|
||||||
| ^^^^^^^ pattern `Box(_)` not covered
|
| ^^^^^^^ pattern `Box(_)` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `std::boxed::Box<ElementKind>`
|
||||||
|
|
||||||
error: aborting due to previous error
|
error: aborting due to previous error
|
||||||
|
|
||||||
|
|
|
@ -10,6 +10,7 @@ LL | match f {
|
||||||
| ^ patterns `Bar { bar: C, .. }`, `Bar { bar: D, .. }`, `Bar { bar: E, .. }` and 1 more not covered
|
| ^ patterns `Bar { bar: C, .. }`, `Bar { bar: D, .. }`, `Bar { bar: E, .. }` and 1 more not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `Foo`
|
||||||
|
|
||||||
error: aborting due to previous error
|
error: aborting due to previous error
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,7 @@ LL | println!("foo {:}", match tup {
|
||||||
| ^^^ pattern `(true, false)` not covered
|
| ^^^ pattern `(true, false)` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `(bool, bool)`
|
||||||
|
|
||||||
error: aborting due to previous error
|
error: aborting due to previous error
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,15 @@
|
||||||
|
macro_rules! make_item {
|
||||||
|
($a:ident) => {
|
||||||
|
struct $a;
|
||||||
|
}; //~^ ERROR expected expression
|
||||||
|
//~| ERROR expected expression
|
||||||
|
}
|
||||||
|
|
||||||
|
fn a() {
|
||||||
|
make_item!(A)
|
||||||
|
}
|
||||||
|
fn b() {
|
||||||
|
make_item!(B)
|
||||||
|
}
|
||||||
|
|
||||||
|
fn main() {}
|
|
@ -0,0 +1,34 @@
|
||||||
|
error: expected expression, found keyword `struct`
|
||||||
|
--> $DIR/issue-34421-mac-expr-bad-stmt-good-add-semi.rs:3:9
|
||||||
|
|
|
||||||
|
LL | struct $a;
|
||||||
|
| ^^^^^^ expected expression
|
||||||
|
...
|
||||||
|
LL | make_item!(A)
|
||||||
|
| ------------- in this macro invocation
|
||||||
|
|
|
||||||
|
= note: the macro call doesn't expand to an expression, but it can expand to a statement
|
||||||
|
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||||
|
help: add `;` to interpret the expansion as a statement
|
||||||
|
|
|
||||||
|
LL | make_item!(A);
|
||||||
|
| ^
|
||||||
|
|
||||||
|
error: expected expression, found keyword `struct`
|
||||||
|
--> $DIR/issue-34421-mac-expr-bad-stmt-good-add-semi.rs:3:9
|
||||||
|
|
|
||||||
|
LL | struct $a;
|
||||||
|
| ^^^^^^ expected expression
|
||||||
|
...
|
||||||
|
LL | make_item!(B)
|
||||||
|
| ------------- in this macro invocation
|
||||||
|
|
|
||||||
|
= note: the macro call doesn't expand to an expression, but it can expand to a statement
|
||||||
|
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||||
|
help: add `;` to interpret the expansion as a statement
|
||||||
|
|
|
||||||
|
LL | make_item!(B);
|
||||||
|
| ^
|
||||||
|
|
||||||
|
error: aborting due to 2 previous errors
|
||||||
|
|
|
@ -6,6 +6,12 @@ LL | macro_rules! empty { () => () }
|
||||||
...
|
...
|
||||||
LL | _ => { empty!() }
|
LL | _ => { empty!() }
|
||||||
| ^^^^^^^^ expected expression
|
| ^^^^^^^^ expected expression
|
||||||
|
|
|
||||||
|
= note: the macro call doesn't expand to an expression, but it can expand to a statement
|
||||||
|
help: add `;` to interpret the expansion as a statement
|
||||||
|
|
|
||||||
|
LL | _ => { empty!(); }
|
||||||
|
| ^
|
||||||
|
|
||||||
error: aborting due to previous error
|
error: aborting due to previous error
|
||||||
|
|
||||||
|
|
|
@ -8,6 +8,7 @@ LL | match Tag::ExifIFDPointer {
|
||||||
| ^^^^^^^^^^^^^^^^^^^ pattern `Tag(Exif, _)` not covered
|
| ^^^^^^^^^^^^^^^^^^^ pattern `Tag(Exif, _)` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `Tag`
|
||||||
|
|
||||||
error: aborting due to previous error
|
error: aborting due to previous error
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,7 @@ LL | match proto {
|
||||||
| ^^^^^ pattern `C(QA)` not covered
|
| ^^^^^ pattern `C(QA)` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `P`
|
||||||
|
|
||||||
error: aborting due to previous error
|
error: aborting due to previous error
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,7 @@ LL | match (0u8, 0u8) {
|
||||||
| ^^^^^^^^^^ pattern `(2u8..=std::u8::MAX, _)` not covered
|
| ^^^^^^^^^^ pattern `(2u8..=std::u8::MAX, _)` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `(u8, u8)`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `((4u8..=std::u8::MAX))` not covered
|
error[E0004]: non-exhaustive patterns: `((4u8..=std::u8::MAX))` not covered
|
||||||
--> $DIR/exhaustiveness-non-exhaustive.rs:10:11
|
--> $DIR/exhaustiveness-non-exhaustive.rs:10:11
|
||||||
|
@ -13,6 +14,7 @@ LL | match ((0u8,),) {
|
||||||
| ^^^^^^^^^ pattern `((4u8..=std::u8::MAX))` not covered
|
| ^^^^^^^^^ pattern `((4u8..=std::u8::MAX))` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `((u8,),)`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `(Some(2u8..=std::u8::MAX))` not covered
|
error[E0004]: non-exhaustive patterns: `(Some(2u8..=std::u8::MAX))` not covered
|
||||||
--> $DIR/exhaustiveness-non-exhaustive.rs:14:11
|
--> $DIR/exhaustiveness-non-exhaustive.rs:14:11
|
||||||
|
@ -21,6 +23,7 @@ LL | match (Some(0u8),) {
|
||||||
| ^^^^^^^^^^^^ pattern `(Some(2u8..=std::u8::MAX))` not covered
|
| ^^^^^^^^^^^^ pattern `(Some(2u8..=std::u8::MAX))` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `(std::option::Option<u8>,)`
|
||||||
|
|
||||||
error: aborting due to 3 previous errors
|
error: aborting due to 3 previous errors
|
||||||
|
|
||||||
|
|
|
@ -6,6 +6,7 @@ LL | let 0 | (1 | 2) = 0;
|
||||||
|
|
|
|
||||||
= note: `let` bindings require an "irrefutable pattern", like a `struct` or an `enum` with only one variant
|
= note: `let` bindings require an "irrefutable pattern", like a `struct` or an `enum` with only one variant
|
||||||
= note: for more information, visit https://doc.rust-lang.org/book/ch18-02-refutability.html
|
= note: for more information, visit https://doc.rust-lang.org/book/ch18-02-refutability.html
|
||||||
|
= note: the matched value is of type `i32`
|
||||||
help: you might want to use `if let` to ignore the variant that isn't matched
|
help: you might want to use `if let` to ignore the variant that isn't matched
|
||||||
|
|
|
|
||||||
LL | if let 0 | (1 | 2) = 0 { /* */ }
|
LL | if let 0 | (1 | 2) = 0 { /* */ }
|
||||||
|
@ -18,6 +19,7 @@ LL | match 0 {
|
||||||
| ^ patterns `std::i32::MIN..=-1i32` and `3i32..=std::i32::MAX` not covered
|
| ^ patterns `std::i32::MIN..=-1i32` and `3i32..=std::i32::MAX` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `i32`
|
||||||
|
|
||||||
error: aborting due to 2 previous errors
|
error: aborting due to 2 previous errors
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,7 @@ LL | match uninhab_ref() {
|
||||||
| ^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `&!`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: type `Foo` is non-empty
|
error[E0004]: non-exhaustive patterns: type `Foo` is non-empty
|
||||||
--> $DIR/always-inhabited-union-ref.rs:27:11
|
--> $DIR/always-inhabited-union-ref.rs:27:11
|
||||||
|
@ -18,6 +19,7 @@ LL | match uninhab_union() {
|
||||||
| ^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `Foo`
|
||||||
|
|
||||||
error: aborting due to 2 previous errors
|
error: aborting due to 2 previous errors
|
||||||
|
|
||||||
|
|
|
@ -17,6 +17,7 @@ LL | match x {
|
||||||
| ^ pattern `128u8..=std::u8::MAX` not covered
|
| ^ pattern `128u8..=std::u8::MAX` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `u8`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `11u8..=19u8`, `31u8..=34u8`, `36u8..=69u8` and 1 more not covered
|
error[E0004]: non-exhaustive patterns: `11u8..=19u8`, `31u8..=34u8`, `36u8..=69u8` and 1 more not covered
|
||||||
--> $DIR/exhaustive_integer_patterns.rs:33:11
|
--> $DIR/exhaustive_integer_patterns.rs:33:11
|
||||||
|
@ -25,6 +26,7 @@ LL | match x {
|
||||||
| ^ patterns `11u8..=19u8`, `31u8..=34u8`, `36u8..=69u8` and 1 more not covered
|
| ^ patterns `11u8..=19u8`, `31u8..=34u8`, `36u8..=69u8` and 1 more not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `u8`
|
||||||
|
|
||||||
error: unreachable pattern
|
error: unreachable pattern
|
||||||
--> $DIR/exhaustive_integer_patterns.rs:44:9
|
--> $DIR/exhaustive_integer_patterns.rs:44:9
|
||||||
|
@ -39,6 +41,7 @@ LL | match x {
|
||||||
| ^ patterns `std::i8::MIN..=-8i8`, `-6i8`, `121i8..=124i8` and 1 more not covered
|
| ^ patterns `std::i8::MIN..=-8i8`, `-6i8`, `121i8..=124i8` and 1 more not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `i8`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `std::i8::MIN` not covered
|
error[E0004]: non-exhaustive patterns: `std::i8::MIN` not covered
|
||||||
--> $DIR/exhaustive_integer_patterns.rs:83:11
|
--> $DIR/exhaustive_integer_patterns.rs:83:11
|
||||||
|
@ -47,6 +50,7 @@ LL | match 0i8 {
|
||||||
| ^^^ pattern `std::i8::MIN` not covered
|
| ^^^ pattern `std::i8::MIN` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `i8`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `0i16` not covered
|
error[E0004]: non-exhaustive patterns: `0i16` not covered
|
||||||
--> $DIR/exhaustive_integer_patterns.rs:91:11
|
--> $DIR/exhaustive_integer_patterns.rs:91:11
|
||||||
|
@ -55,6 +59,7 @@ LL | match 0i16 {
|
||||||
| ^^^^ pattern `0i16` not covered
|
| ^^^^ pattern `0i16` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `i16`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `128u8..=std::u8::MAX` not covered
|
error[E0004]: non-exhaustive patterns: `128u8..=std::u8::MAX` not covered
|
||||||
--> $DIR/exhaustive_integer_patterns.rs:109:11
|
--> $DIR/exhaustive_integer_patterns.rs:109:11
|
||||||
|
@ -63,6 +68,7 @@ LL | match 0u8 {
|
||||||
| ^^^ pattern `128u8..=std::u8::MAX` not covered
|
| ^^^ pattern `128u8..=std::u8::MAX` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `u8`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `(0u8, Some(_))` and `(2u8..=std::u8::MAX, Some(_))` not covered
|
error[E0004]: non-exhaustive patterns: `(0u8, Some(_))` and `(2u8..=std::u8::MAX, Some(_))` not covered
|
||||||
--> $DIR/exhaustive_integer_patterns.rs:121:11
|
--> $DIR/exhaustive_integer_patterns.rs:121:11
|
||||||
|
@ -71,6 +77,7 @@ LL | match (0u8, Some(())) {
|
||||||
| ^^^^^^^^^^^^^^^ patterns `(0u8, Some(_))` and `(2u8..=std::u8::MAX, Some(_))` not covered
|
| ^^^^^^^^^^^^^^^ patterns `(0u8, Some(_))` and `(2u8..=std::u8::MAX, Some(_))` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `(u8, std::option::Option<()>)`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `(126u8..=127u8, false)` not covered
|
error[E0004]: non-exhaustive patterns: `(126u8..=127u8, false)` not covered
|
||||||
--> $DIR/exhaustive_integer_patterns.rs:126:11
|
--> $DIR/exhaustive_integer_patterns.rs:126:11
|
||||||
|
@ -79,6 +86,7 @@ LL | match (0u8, true) {
|
||||||
| ^^^^^^^^^^^ pattern `(126u8..=127u8, false)` not covered
|
| ^^^^^^^^^^^ pattern `(126u8..=127u8, false)` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `(u8, bool)`
|
||||||
|
|
||||||
error: multiple patterns covering the same range
|
error: multiple patterns covering the same range
|
||||||
--> $DIR/exhaustive_integer_patterns.rs:141:9
|
--> $DIR/exhaustive_integer_patterns.rs:141:9
|
||||||
|
@ -101,6 +109,7 @@ LL | match 0u128 {
|
||||||
| ^^^^^ pattern `std::u128::MAX` not covered
|
| ^^^^^ pattern `std::u128::MAX` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `u128`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `5u128..=std::u128::MAX` not covered
|
error[E0004]: non-exhaustive patterns: `5u128..=std::u128::MAX` not covered
|
||||||
--> $DIR/exhaustive_integer_patterns.rs:150:11
|
--> $DIR/exhaustive_integer_patterns.rs:150:11
|
||||||
|
@ -109,6 +118,7 @@ LL | match 0u128 {
|
||||||
| ^^^^^ pattern `5u128..=std::u128::MAX` not covered
|
| ^^^^^ pattern `5u128..=std::u128::MAX` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `u128`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `0u128..=3u128` not covered
|
error[E0004]: non-exhaustive patterns: `0u128..=3u128` not covered
|
||||||
--> $DIR/exhaustive_integer_patterns.rs:154:11
|
--> $DIR/exhaustive_integer_patterns.rs:154:11
|
||||||
|
@ -117,6 +127,7 @@ LL | match 0u128 {
|
||||||
| ^^^^^ pattern `0u128..=3u128` not covered
|
| ^^^^^ pattern `0u128..=3u128` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `u128`
|
||||||
|
|
||||||
error: unreachable pattern
|
error: unreachable pattern
|
||||||
--> $DIR/exhaustive_integer_patterns.rs:162:9
|
--> $DIR/exhaustive_integer_patterns.rs:162:9
|
||||||
|
|
|
@ -5,6 +5,7 @@ LL | match (A, ()) {
|
||||||
| ^^^^^^^ patterns `(B, _)`, `(C, _)`, `(D, _)` and 2 more not covered
|
| ^^^^^^^ patterns `(B, _)`, `(C, _)`, `(D, _)` and 2 more not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `(Enum, ())`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `(_, B)`, `(_, C)`, `(_, D)` and 2 more not covered
|
error[E0004]: non-exhaustive patterns: `(_, B)`, `(_, C)`, `(_, D)` and 2 more not covered
|
||||||
--> $DIR/issue-35609.rs:14:11
|
--> $DIR/issue-35609.rs:14:11
|
||||||
|
@ -13,6 +14,7 @@ LL | match (A, A) {
|
||||||
| ^^^^^^ patterns `(_, B)`, `(_, C)`, `(_, D)` and 2 more not covered
|
| ^^^^^^ patterns `(_, B)`, `(_, C)`, `(_, D)` and 2 more not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `(Enum, Enum)`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `((B, _), _)`, `((C, _), _)`, `((D, _), _)` and 2 more not covered
|
error[E0004]: non-exhaustive patterns: `((B, _), _)`, `((C, _), _)`, `((D, _), _)` and 2 more not covered
|
||||||
--> $DIR/issue-35609.rs:18:11
|
--> $DIR/issue-35609.rs:18:11
|
||||||
|
@ -21,6 +23,7 @@ LL | match ((A, ()), ()) {
|
||||||
| ^^^^^^^^^^^^^ patterns `((B, _), _)`, `((C, _), _)`, `((D, _), _)` and 2 more not covered
|
| ^^^^^^^^^^^^^ patterns `((B, _), _)`, `((C, _), _)`, `((D, _), _)` and 2 more not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `((Enum, ()), ())`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `((B, _), _)`, `((C, _), _)`, `((D, _), _)` and 2 more not covered
|
error[E0004]: non-exhaustive patterns: `((B, _), _)`, `((C, _), _)`, `((D, _), _)` and 2 more not covered
|
||||||
--> $DIR/issue-35609.rs:22:11
|
--> $DIR/issue-35609.rs:22:11
|
||||||
|
@ -29,6 +32,7 @@ LL | match ((A, ()), A) {
|
||||||
| ^^^^^^^^^^^^ patterns `((B, _), _)`, `((C, _), _)`, `((D, _), _)` and 2 more not covered
|
| ^^^^^^^^^^^^ patterns `((B, _), _)`, `((C, _), _)`, `((D, _), _)` and 2 more not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `((Enum, ()), Enum)`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `((B, _), _)`, `((C, _), _)`, `((D, _), _)` and 2 more not covered
|
error[E0004]: non-exhaustive patterns: `((B, _), _)`, `((C, _), _)`, `((D, _), _)` and 2 more not covered
|
||||||
--> $DIR/issue-35609.rs:26:11
|
--> $DIR/issue-35609.rs:26:11
|
||||||
|
@ -37,6 +41,7 @@ LL | match ((A, ()), ()) {
|
||||||
| ^^^^^^^^^^^^^ patterns `((B, _), _)`, `((C, _), _)`, `((D, _), _)` and 2 more not covered
|
| ^^^^^^^^^^^^^ patterns `((B, _), _)`, `((C, _), _)`, `((D, _), _)` and 2 more not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `((Enum, ()), ())`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `S(B, _)`, `S(C, _)`, `S(D, _)` and 2 more not covered
|
error[E0004]: non-exhaustive patterns: `S(B, _)`, `S(C, _)`, `S(D, _)` and 2 more not covered
|
||||||
--> $DIR/issue-35609.rs:31:11
|
--> $DIR/issue-35609.rs:31:11
|
||||||
|
@ -48,6 +53,7 @@ LL | match S(A, ()) {
|
||||||
| ^^^^^^^^ patterns `S(B, _)`, `S(C, _)`, `S(D, _)` and 2 more not covered
|
| ^^^^^^^^ patterns `S(B, _)`, `S(C, _)`, `S(D, _)` and 2 more not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `S`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `Sd { x: B, .. }`, `Sd { x: C, .. }`, `Sd { x: D, .. }` and 2 more not covered
|
error[E0004]: non-exhaustive patterns: `Sd { x: B, .. }`, `Sd { x: C, .. }`, `Sd { x: D, .. }` and 2 more not covered
|
||||||
--> $DIR/issue-35609.rs:35:11
|
--> $DIR/issue-35609.rs:35:11
|
||||||
|
@ -59,6 +65,7 @@ LL | match (Sd { x: A, y: () }) {
|
||||||
| ^^^^^^^^^^^^^^^^^^^^ patterns `Sd { x: B, .. }`, `Sd { x: C, .. }`, `Sd { x: D, .. }` and 2 more not covered
|
| ^^^^^^^^^^^^^^^^^^^^ patterns `Sd { x: B, .. }`, `Sd { x: C, .. }`, `Sd { x: D, .. }` and 2 more not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `Sd`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `Some(B)`, `Some(C)`, `Some(D)` and 2 more not covered
|
error[E0004]: non-exhaustive patterns: `Some(B)`, `Some(C)`, `Some(D)` and 2 more not covered
|
||||||
--> $DIR/issue-35609.rs:39:11
|
--> $DIR/issue-35609.rs:39:11
|
||||||
|
@ -67,6 +74,7 @@ LL | match Some(A) {
|
||||||
| ^^^^^^^ patterns `Some(B)`, `Some(C)`, `Some(D)` and 2 more not covered
|
| ^^^^^^^ patterns `Some(B)`, `Some(C)`, `Some(D)` and 2 more not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `std::option::Option<Enum>`
|
||||||
|
|
||||||
error: aborting due to 8 previous errors
|
error: aborting due to 8 previous errors
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,7 @@ LL | match (true, false) {
|
||||||
| ^^^^^^^^^^^^^ pattern `(true, false)` not covered
|
| ^^^^^^^^^^^^^ pattern `(true, false)` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `(bool, bool)`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `Some(Some(West))` not covered
|
error[E0004]: non-exhaustive patterns: `Some(Some(West))` not covered
|
||||||
--> $DIR/match-arm-statics-2.rs:34:11
|
--> $DIR/match-arm-statics-2.rs:34:11
|
||||||
|
@ -21,6 +22,7 @@ LL | Some(#[stable(feature = "rust1", since = "1.0.0")] T),
|
||||||
| not covered
|
| not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `std::option::Option<std::option::Option<Direction>>`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `Foo { bar: Some(North), baz: NewBool(true) }` not covered
|
error[E0004]: non-exhaustive patterns: `Foo { bar: Some(North), baz: NewBool(true) }` not covered
|
||||||
--> $DIR/match-arm-statics-2.rs:53:11
|
--> $DIR/match-arm-statics-2.rs:53:11
|
||||||
|
@ -35,6 +37,7 @@ LL | match (Foo { bar: Some(North), baz: NewBool(true) }) {
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ pattern `Foo { bar: Some(North), baz: NewBool(true) }` not covered
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ pattern `Foo { bar: Some(North), baz: NewBool(true) }` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `Foo`
|
||||||
|
|
||||||
error: aborting due to 3 previous errors
|
error: aborting due to 3 previous errors
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,7 @@ LL | match buf {
|
||||||
| ^^^ patterns `&[0u8..=64u8, _, _, _]` and `&[66u8..=std::u8::MAX, _, _, _]` not covered
|
| ^^^ patterns `&[0u8..=64u8, _, _, _]` and `&[66u8..=std::u8::MAX, _, _, _]` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `&[u8; 4]`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `&[]`, `&[_]`, `&[_, _]` and 2 more not covered
|
error[E0004]: non-exhaustive patterns: `&[]`, `&[_]`, `&[_, _]` and 2 more not covered
|
||||||
--> $DIR/match-byte-array-patterns-2.rs:10:11
|
--> $DIR/match-byte-array-patterns-2.rs:10:11
|
||||||
|
@ -13,6 +14,7 @@ LL | match buf {
|
||||||
| ^^^ patterns `&[]`, `&[_]`, `&[_, _]` and 2 more not covered
|
| ^^^ patterns `&[]`, `&[_]`, `&[_, _]` and 2 more not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `&[u8]`
|
||||||
|
|
||||||
error: aborting due to 2 previous errors
|
error: aborting due to 2 previous errors
|
||||||
|
|
||||||
|
|
|
@ -35,6 +35,7 @@ LL | match_empty!(0u8);
|
||||||
| ^^^
|
| ^^^
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `u8`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: type `NonEmptyStruct` is non-empty
|
error[E0004]: non-exhaustive patterns: type `NonEmptyStruct` is non-empty
|
||||||
--> $DIR/match-empty-exhaustive_patterns.rs:66:18
|
--> $DIR/match-empty-exhaustive_patterns.rs:66:18
|
||||||
|
@ -46,6 +47,7 @@ LL | match_empty!(NonEmptyStruct(true));
|
||||||
| ^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `NonEmptyStruct`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: type `NonEmptyUnion1` is non-empty
|
error[E0004]: non-exhaustive patterns: type `NonEmptyUnion1` is non-empty
|
||||||
--> $DIR/match-empty-exhaustive_patterns.rs:68:18
|
--> $DIR/match-empty-exhaustive_patterns.rs:68:18
|
||||||
|
@ -59,6 +61,7 @@ LL | match_empty!((NonEmptyUnion1 { foo: () }));
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `NonEmptyUnion1`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: type `NonEmptyUnion2` is non-empty
|
error[E0004]: non-exhaustive patterns: type `NonEmptyUnion2` is non-empty
|
||||||
--> $DIR/match-empty-exhaustive_patterns.rs:70:18
|
--> $DIR/match-empty-exhaustive_patterns.rs:70:18
|
||||||
|
@ -73,6 +76,7 @@ LL | match_empty!((NonEmptyUnion2 { foo: () }));
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `NonEmptyUnion2`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `Foo(_)` not covered
|
error[E0004]: non-exhaustive patterns: `Foo(_)` not covered
|
||||||
--> $DIR/match-empty-exhaustive_patterns.rs:72:18
|
--> $DIR/match-empty-exhaustive_patterns.rs:72:18
|
||||||
|
@ -89,6 +93,7 @@ LL | match_empty!(NonEmptyEnum1::Foo(true));
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^ pattern `Foo(_)` not covered
|
| ^^^^^^^^^^^^^^^^^^^^^^^^ pattern `Foo(_)` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `NonEmptyEnum1`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `Foo(_)` and `Bar` not covered
|
error[E0004]: non-exhaustive patterns: `Foo(_)` and `Bar` not covered
|
||||||
--> $DIR/match-empty-exhaustive_patterns.rs:74:18
|
--> $DIR/match-empty-exhaustive_patterns.rs:74:18
|
||||||
|
@ -109,6 +114,7 @@ LL | match_empty!(NonEmptyEnum2::Foo(true));
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^ patterns `Foo(_)` and `Bar` not covered
|
| ^^^^^^^^^^^^^^^^^^^^^^^^ patterns `Foo(_)` and `Bar` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `NonEmptyEnum2`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `V1`, `V2`, `V3` and 2 more not covered
|
error[E0004]: non-exhaustive patterns: `V1`, `V2`, `V3` and 2 more not covered
|
||||||
--> $DIR/match-empty-exhaustive_patterns.rs:76:18
|
--> $DIR/match-empty-exhaustive_patterns.rs:76:18
|
||||||
|
@ -122,6 +128,7 @@ LL | match_empty!(NonEmptyEnum5::V1);
|
||||||
| ^^^^^^^^^^^^^^^^^ patterns `V1`, `V2`, `V3` and 2 more not covered
|
| ^^^^^^^^^^^^^^^^^ patterns `V1`, `V2`, `V3` and 2 more not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `NonEmptyEnum5`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `_` not covered
|
error[E0004]: non-exhaustive patterns: `_` not covered
|
||||||
--> $DIR/match-empty-exhaustive_patterns.rs:79:18
|
--> $DIR/match-empty-exhaustive_patterns.rs:79:18
|
||||||
|
@ -130,6 +137,7 @@ LL | match_false!(0u8);
|
||||||
| ^^^ pattern `_` not covered
|
| ^^^ pattern `_` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `u8`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `NonEmptyStruct(_)` not covered
|
error[E0004]: non-exhaustive patterns: `NonEmptyStruct(_)` not covered
|
||||||
--> $DIR/match-empty-exhaustive_patterns.rs:81:18
|
--> $DIR/match-empty-exhaustive_patterns.rs:81:18
|
||||||
|
@ -141,6 +149,7 @@ LL | match_false!(NonEmptyStruct(true));
|
||||||
| ^^^^^^^^^^^^^^^^^^^^ pattern `NonEmptyStruct(_)` not covered
|
| ^^^^^^^^^^^^^^^^^^^^ pattern `NonEmptyStruct(_)` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `NonEmptyStruct`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `NonEmptyUnion1 { .. }` not covered
|
error[E0004]: non-exhaustive patterns: `NonEmptyUnion1 { .. }` not covered
|
||||||
--> $DIR/match-empty-exhaustive_patterns.rs:83:18
|
--> $DIR/match-empty-exhaustive_patterns.rs:83:18
|
||||||
|
@ -154,6 +163,7 @@ LL | match_false!((NonEmptyUnion1 { foo: () }));
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ pattern `NonEmptyUnion1 { .. }` not covered
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ pattern `NonEmptyUnion1 { .. }` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `NonEmptyUnion1`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `NonEmptyUnion2 { .. }` not covered
|
error[E0004]: non-exhaustive patterns: `NonEmptyUnion2 { .. }` not covered
|
||||||
--> $DIR/match-empty-exhaustive_patterns.rs:85:18
|
--> $DIR/match-empty-exhaustive_patterns.rs:85:18
|
||||||
|
@ -168,6 +178,7 @@ LL | match_false!((NonEmptyUnion2 { foo: () }));
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ pattern `NonEmptyUnion2 { .. }` not covered
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ pattern `NonEmptyUnion2 { .. }` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `NonEmptyUnion2`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `Foo(_)` not covered
|
error[E0004]: non-exhaustive patterns: `Foo(_)` not covered
|
||||||
--> $DIR/match-empty-exhaustive_patterns.rs:87:18
|
--> $DIR/match-empty-exhaustive_patterns.rs:87:18
|
||||||
|
@ -184,6 +195,7 @@ LL | match_false!(NonEmptyEnum1::Foo(true));
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^ pattern `Foo(_)` not covered
|
| ^^^^^^^^^^^^^^^^^^^^^^^^ pattern `Foo(_)` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `NonEmptyEnum1`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `Foo(_)` and `Bar` not covered
|
error[E0004]: non-exhaustive patterns: `Foo(_)` and `Bar` not covered
|
||||||
--> $DIR/match-empty-exhaustive_patterns.rs:89:18
|
--> $DIR/match-empty-exhaustive_patterns.rs:89:18
|
||||||
|
@ -204,6 +216,7 @@ LL | match_false!(NonEmptyEnum2::Foo(true));
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^ patterns `Foo(_)` and `Bar` not covered
|
| ^^^^^^^^^^^^^^^^^^^^^^^^ patterns `Foo(_)` and `Bar` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `NonEmptyEnum2`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `V1`, `V2`, `V3` and 2 more not covered
|
error[E0004]: non-exhaustive patterns: `V1`, `V2`, `V3` and 2 more not covered
|
||||||
--> $DIR/match-empty-exhaustive_patterns.rs:91:18
|
--> $DIR/match-empty-exhaustive_patterns.rs:91:18
|
||||||
|
@ -217,6 +230,7 @@ LL | match_false!(NonEmptyEnum5::V1);
|
||||||
| ^^^^^^^^^^^^^^^^^ patterns `V1`, `V2`, `V3` and 2 more not covered
|
| ^^^^^^^^^^^^^^^^^ patterns `V1`, `V2`, `V3` and 2 more not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `NonEmptyEnum5`
|
||||||
|
|
||||||
error: aborting due to 18 previous errors
|
error: aborting due to 18 previous errors
|
||||||
|
|
||||||
|
|
|
@ -8,6 +8,7 @@ LL | match_false!(x); // Not detected as unreachable nor exhaustive.
|
||||||
| ^ pattern `_` not covered
|
| ^ pattern `_` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `Foo`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: type `u8` is non-empty
|
error[E0004]: non-exhaustive patterns: type `u8` is non-empty
|
||||||
--> $DIR/match-empty.rs:63:18
|
--> $DIR/match-empty.rs:63:18
|
||||||
|
@ -16,6 +17,7 @@ LL | match_empty!(0u8);
|
||||||
| ^^^
|
| ^^^
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `u8`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: type `NonEmptyStruct` is non-empty
|
error[E0004]: non-exhaustive patterns: type `NonEmptyStruct` is non-empty
|
||||||
--> $DIR/match-empty.rs:65:18
|
--> $DIR/match-empty.rs:65:18
|
||||||
|
@ -27,6 +29,7 @@ LL | match_empty!(NonEmptyStruct(true));
|
||||||
| ^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `NonEmptyStruct`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: type `NonEmptyUnion1` is non-empty
|
error[E0004]: non-exhaustive patterns: type `NonEmptyUnion1` is non-empty
|
||||||
--> $DIR/match-empty.rs:67:18
|
--> $DIR/match-empty.rs:67:18
|
||||||
|
@ -40,6 +43,7 @@ LL | match_empty!((NonEmptyUnion1 { foo: () }));
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `NonEmptyUnion1`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: type `NonEmptyUnion2` is non-empty
|
error[E0004]: non-exhaustive patterns: type `NonEmptyUnion2` is non-empty
|
||||||
--> $DIR/match-empty.rs:69:18
|
--> $DIR/match-empty.rs:69:18
|
||||||
|
@ -54,6 +58,7 @@ LL | match_empty!((NonEmptyUnion2 { foo: () }));
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `NonEmptyUnion2`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `Foo(_)` not covered
|
error[E0004]: non-exhaustive patterns: `Foo(_)` not covered
|
||||||
--> $DIR/match-empty.rs:71:18
|
--> $DIR/match-empty.rs:71:18
|
||||||
|
@ -70,6 +75,7 @@ LL | match_empty!(NonEmptyEnum1::Foo(true));
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^ pattern `Foo(_)` not covered
|
| ^^^^^^^^^^^^^^^^^^^^^^^^ pattern `Foo(_)` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `NonEmptyEnum1`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `Foo(_)` and `Bar` not covered
|
error[E0004]: non-exhaustive patterns: `Foo(_)` and `Bar` not covered
|
||||||
--> $DIR/match-empty.rs:73:18
|
--> $DIR/match-empty.rs:73:18
|
||||||
|
@ -90,6 +96,7 @@ LL | match_empty!(NonEmptyEnum2::Foo(true));
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^ patterns `Foo(_)` and `Bar` not covered
|
| ^^^^^^^^^^^^^^^^^^^^^^^^ patterns `Foo(_)` and `Bar` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `NonEmptyEnum2`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `V1`, `V2`, `V3` and 2 more not covered
|
error[E0004]: non-exhaustive patterns: `V1`, `V2`, `V3` and 2 more not covered
|
||||||
--> $DIR/match-empty.rs:75:18
|
--> $DIR/match-empty.rs:75:18
|
||||||
|
@ -103,6 +110,7 @@ LL | match_empty!(NonEmptyEnum5::V1);
|
||||||
| ^^^^^^^^^^^^^^^^^ patterns `V1`, `V2`, `V3` and 2 more not covered
|
| ^^^^^^^^^^^^^^^^^ patterns `V1`, `V2`, `V3` and 2 more not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `NonEmptyEnum5`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `_` not covered
|
error[E0004]: non-exhaustive patterns: `_` not covered
|
||||||
--> $DIR/match-empty.rs:78:18
|
--> $DIR/match-empty.rs:78:18
|
||||||
|
@ -111,6 +119,7 @@ LL | match_false!(0u8);
|
||||||
| ^^^ pattern `_` not covered
|
| ^^^ pattern `_` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `u8`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `NonEmptyStruct(_)` not covered
|
error[E0004]: non-exhaustive patterns: `NonEmptyStruct(_)` not covered
|
||||||
--> $DIR/match-empty.rs:80:18
|
--> $DIR/match-empty.rs:80:18
|
||||||
|
@ -122,6 +131,7 @@ LL | match_false!(NonEmptyStruct(true));
|
||||||
| ^^^^^^^^^^^^^^^^^^^^ pattern `NonEmptyStruct(_)` not covered
|
| ^^^^^^^^^^^^^^^^^^^^ pattern `NonEmptyStruct(_)` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `NonEmptyStruct`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `NonEmptyUnion1 { .. }` not covered
|
error[E0004]: non-exhaustive patterns: `NonEmptyUnion1 { .. }` not covered
|
||||||
--> $DIR/match-empty.rs:82:18
|
--> $DIR/match-empty.rs:82:18
|
||||||
|
@ -135,6 +145,7 @@ LL | match_false!((NonEmptyUnion1 { foo: () }));
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ pattern `NonEmptyUnion1 { .. }` not covered
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ pattern `NonEmptyUnion1 { .. }` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `NonEmptyUnion1`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `NonEmptyUnion2 { .. }` not covered
|
error[E0004]: non-exhaustive patterns: `NonEmptyUnion2 { .. }` not covered
|
||||||
--> $DIR/match-empty.rs:84:18
|
--> $DIR/match-empty.rs:84:18
|
||||||
|
@ -149,6 +160,7 @@ LL | match_false!((NonEmptyUnion2 { foo: () }));
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ pattern `NonEmptyUnion2 { .. }` not covered
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ pattern `NonEmptyUnion2 { .. }` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `NonEmptyUnion2`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `Foo(_)` not covered
|
error[E0004]: non-exhaustive patterns: `Foo(_)` not covered
|
||||||
--> $DIR/match-empty.rs:86:18
|
--> $DIR/match-empty.rs:86:18
|
||||||
|
@ -165,6 +177,7 @@ LL | match_false!(NonEmptyEnum1::Foo(true));
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^ pattern `Foo(_)` not covered
|
| ^^^^^^^^^^^^^^^^^^^^^^^^ pattern `Foo(_)` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `NonEmptyEnum1`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `Foo(_)` and `Bar` not covered
|
error[E0004]: non-exhaustive patterns: `Foo(_)` and `Bar` not covered
|
||||||
--> $DIR/match-empty.rs:88:18
|
--> $DIR/match-empty.rs:88:18
|
||||||
|
@ -185,6 +198,7 @@ LL | match_false!(NonEmptyEnum2::Foo(true));
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^ patterns `Foo(_)` and `Bar` not covered
|
| ^^^^^^^^^^^^^^^^^^^^^^^^ patterns `Foo(_)` and `Bar` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `NonEmptyEnum2`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `V1`, `V2`, `V3` and 2 more not covered
|
error[E0004]: non-exhaustive patterns: `V1`, `V2`, `V3` and 2 more not covered
|
||||||
--> $DIR/match-empty.rs:90:18
|
--> $DIR/match-empty.rs:90:18
|
||||||
|
@ -198,6 +212,7 @@ LL | match_false!(NonEmptyEnum5::V1);
|
||||||
| ^^^^^^^^^^^^^^^^^ patterns `V1`, `V2`, `V3` and 2 more not covered
|
| ^^^^^^^^^^^^^^^^^ patterns `V1`, `V2`, `V3` and 2 more not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `NonEmptyEnum5`
|
||||||
|
|
||||||
error: aborting due to 15 previous errors
|
error: aborting due to 15 previous errors
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,7 @@ LL | match 0 { 1 => () }
|
||||||
| ^ patterns `std::i32::MIN..=0i32` and `2i32..=std::i32::MAX` not covered
|
| ^ patterns `std::i32::MIN..=0i32` and `2i32..=std::i32::MAX` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `i32`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `_` not covered
|
error[E0004]: non-exhaustive patterns: `_` not covered
|
||||||
--> $DIR/match-non-exhaustive.rs:3:11
|
--> $DIR/match-non-exhaustive.rs:3:11
|
||||||
|
@ -13,6 +14,7 @@ LL | match 0 { 0 if false => () }
|
||||||
| ^ pattern `_` not covered
|
| ^ pattern `_` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `i32`
|
||||||
|
|
||||||
error: aborting due to 2 previous errors
|
error: aborting due to 2 previous errors
|
||||||
|
|
||||||
|
|
|
@ -10,6 +10,7 @@ LL | Some(#[stable(feature = "rust1", since = "1.0.0")] T),
|
||||||
| ---- not covered
|
| ---- not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `std::option::Option<private::Private>`
|
||||||
|
|
||||||
error: aborting due to previous error
|
error: aborting due to previous error
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,7 @@ LL | match list {
|
||||||
| ^^^^ pattern `&[_, Some(_), .., None, _]` not covered
|
| ^^^^ pattern `&[_, Some(_), .., None, _]` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `&[std::option::Option<()>]`
|
||||||
|
|
||||||
error: aborting due to previous error
|
error: aborting due to previous error
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,7 @@ LL | match e1 {
|
||||||
| ^^ patterns `B` and `C` not covered
|
| ^^ patterns `B` and `C` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `E`
|
||||||
|
|
||||||
error[E0005]: refutable pattern in local binding: `B` and `C` not covered
|
error[E0005]: refutable pattern in local binding: `B` and `C` not covered
|
||||||
--> $DIR/non-exhaustive-defined-here.rs:36:9
|
--> $DIR/non-exhaustive-defined-here.rs:36:9
|
||||||
|
@ -44,6 +45,7 @@ LL | let E::A = e;
|
||||||
|
|
|
|
||||||
= note: `let` bindings require an "irrefutable pattern", like a `struct` or an `enum` with only one variant
|
= note: `let` bindings require an "irrefutable pattern", like a `struct` or an `enum` with only one variant
|
||||||
= note: for more information, visit https://doc.rust-lang.org/book/ch18-02-refutability.html
|
= note: for more information, visit https://doc.rust-lang.org/book/ch18-02-refutability.html
|
||||||
|
= note: the matched value is of type `E`
|
||||||
help: you might want to use `if let` to ignore the variant that isn't matched
|
help: you might want to use `if let` to ignore the variant that isn't matched
|
||||||
|
|
|
|
||||||
LL | if let E::A = e { /* */ }
|
LL | if let E::A = e { /* */ }
|
||||||
|
@ -71,6 +73,7 @@ LL | match e {
|
||||||
| ^ patterns `&B` and `&C` not covered
|
| ^ patterns `&B` and `&C` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `&E`
|
||||||
|
|
||||||
error[E0005]: refutable pattern in local binding: `&B` and `&C` not covered
|
error[E0005]: refutable pattern in local binding: `&B` and `&C` not covered
|
||||||
--> $DIR/non-exhaustive-defined-here.rs:44:9
|
--> $DIR/non-exhaustive-defined-here.rs:44:9
|
||||||
|
@ -95,6 +98,7 @@ LL | let E::A = e;
|
||||||
|
|
|
|
||||||
= note: `let` bindings require an "irrefutable pattern", like a `struct` or an `enum` with only one variant
|
= note: `let` bindings require an "irrefutable pattern", like a `struct` or an `enum` with only one variant
|
||||||
= note: for more information, visit https://doc.rust-lang.org/book/ch18-02-refutability.html
|
= note: for more information, visit https://doc.rust-lang.org/book/ch18-02-refutability.html
|
||||||
|
= note: the matched value is of type `&E`
|
||||||
help: you might want to use `if let` to ignore the variant that isn't matched
|
help: you might want to use `if let` to ignore the variant that isn't matched
|
||||||
|
|
|
|
||||||
LL | if let E::A = e { /* */ }
|
LL | if let E::A = e { /* */ }
|
||||||
|
@ -122,6 +126,7 @@ LL | match e {
|
||||||
| ^ patterns `&&mut &B` and `&&mut &C` not covered
|
| ^ patterns `&&mut &B` and `&&mut &C` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `&&mut &E`
|
||||||
|
|
||||||
error[E0005]: refutable pattern in local binding: `&&mut &B` and `&&mut &C` not covered
|
error[E0005]: refutable pattern in local binding: `&&mut &B` and `&&mut &C` not covered
|
||||||
--> $DIR/non-exhaustive-defined-here.rs:52:9
|
--> $DIR/non-exhaustive-defined-here.rs:52:9
|
||||||
|
@ -146,6 +151,7 @@ LL | let E::A = e;
|
||||||
|
|
|
|
||||||
= note: `let` bindings require an "irrefutable pattern", like a `struct` or an `enum` with only one variant
|
= note: `let` bindings require an "irrefutable pattern", like a `struct` or an `enum` with only one variant
|
||||||
= note: for more information, visit https://doc.rust-lang.org/book/ch18-02-refutability.html
|
= note: for more information, visit https://doc.rust-lang.org/book/ch18-02-refutability.html
|
||||||
|
= note: the matched value is of type `&&mut &E`
|
||||||
help: you might want to use `if let` to ignore the variant that isn't matched
|
help: you might want to use `if let` to ignore the variant that isn't matched
|
||||||
|
|
|
|
||||||
LL | if let E::A = e { /* */ }
|
LL | if let E::A = e { /* */ }
|
||||||
|
@ -168,6 +174,7 @@ LL | match e {
|
||||||
| ^ pattern `None` not covered
|
| ^ pattern `None` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `Opt`
|
||||||
|
|
||||||
error[E0005]: refutable pattern in local binding: `None` not covered
|
error[E0005]: refutable pattern in local binding: `None` not covered
|
||||||
--> $DIR/non-exhaustive-defined-here.rs:69:9
|
--> $DIR/non-exhaustive-defined-here.rs:69:9
|
||||||
|
@ -187,6 +194,7 @@ LL | let Opt::Some(ref _x) = e;
|
||||||
|
|
|
|
||||||
= note: `let` bindings require an "irrefutable pattern", like a `struct` or an `enum` with only one variant
|
= note: `let` bindings require an "irrefutable pattern", like a `struct` or an `enum` with only one variant
|
||||||
= note: for more information, visit https://doc.rust-lang.org/book/ch18-02-refutability.html
|
= note: for more information, visit https://doc.rust-lang.org/book/ch18-02-refutability.html
|
||||||
|
= note: the matched value is of type `Opt`
|
||||||
help: you might want to use `if let` to ignore the variant that isn't matched
|
help: you might want to use `if let` to ignore the variant that isn't matched
|
||||||
|
|
|
|
||||||
LL | if let Opt::Some(ref _x) = e { /* */ }
|
LL | if let Opt::Some(ref _x) = e { /* */ }
|
||||||
|
|
|
@ -5,6 +5,7 @@ LL | match 0.0 {
|
||||||
| ^^^ pattern `_` not covered
|
| ^^^ pattern `_` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `f64`
|
||||||
|
|
||||||
error: aborting due to previous error
|
error: aborting due to previous error
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,7 @@ LL | match (l1, l2) {
|
||||||
| ^^^^^^^^ pattern `(Some(&[]), Err(_))` not covered
|
| ^^^^^^^^ pattern `(Some(&[]), Err(_))` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `(std::option::Option<&[T]>, std::result::Result<&[T], ()>)`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `A(C)` not covered
|
error[E0004]: non-exhaustive patterns: `A(C)` not covered
|
||||||
--> $DIR/non-exhaustive-match-nested.rs:15:11
|
--> $DIR/non-exhaustive-match-nested.rs:15:11
|
||||||
|
@ -19,6 +20,7 @@ LL | match x {
|
||||||
| ^ pattern `A(C)` not covered
|
| ^ pattern `A(C)` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `T`
|
||||||
|
|
||||||
error: aborting due to 2 previous errors
|
error: aborting due to 2 previous errors
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,7 @@ LL | match x { T::B => { } }
|
||||||
| ^ pattern `A` not covered
|
| ^ pattern `A` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `T`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `false` not covered
|
error[E0004]: non-exhaustive patterns: `false` not covered
|
||||||
--> $DIR/non-exhaustive-match.rs:13:11
|
--> $DIR/non-exhaustive-match.rs:13:11
|
||||||
|
@ -19,6 +20,7 @@ LL | match true {
|
||||||
| ^^^^ pattern `false` not covered
|
| ^^^^ pattern `false` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `bool`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `Some(_)` not covered
|
error[E0004]: non-exhaustive patterns: `Some(_)` not covered
|
||||||
--> $DIR/non-exhaustive-match.rs:16:11
|
--> $DIR/non-exhaustive-match.rs:16:11
|
||||||
|
@ -32,6 +34,7 @@ LL | Some(#[stable(feature = "rust1", since = "1.0.0")] T),
|
||||||
| ---- not covered
|
| ---- not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `std::option::Option<i32>`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `(_, _, std::i32::MIN..=3i32)` and `(_, _, 5i32..=std::i32::MAX)` not covered
|
error[E0004]: non-exhaustive patterns: `(_, _, std::i32::MIN..=3i32)` and `(_, _, 5i32..=std::i32::MAX)` not covered
|
||||||
--> $DIR/non-exhaustive-match.rs:19:11
|
--> $DIR/non-exhaustive-match.rs:19:11
|
||||||
|
@ -40,6 +43,7 @@ LL | match (2, 3, 4) {
|
||||||
| ^^^^^^^^^ patterns `(_, _, std::i32::MIN..=3i32)` and `(_, _, 5i32..=std::i32::MAX)` not covered
|
| ^^^^^^^^^ patterns `(_, _, std::i32::MIN..=3i32)` and `(_, _, 5i32..=std::i32::MAX)` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `(i32, i32, i32)`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `(A, A)` not covered
|
error[E0004]: non-exhaustive patterns: `(A, A)` not covered
|
||||||
--> $DIR/non-exhaustive-match.rs:23:11
|
--> $DIR/non-exhaustive-match.rs:23:11
|
||||||
|
@ -48,6 +52,7 @@ LL | match (T::A, T::A) {
|
||||||
| ^^^^^^^^^^^^ pattern `(A, A)` not covered
|
| ^^^^^^^^^^^^ pattern `(A, A)` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `(T, T)`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `B` not covered
|
error[E0004]: non-exhaustive patterns: `B` not covered
|
||||||
--> $DIR/non-exhaustive-match.rs:27:11
|
--> $DIR/non-exhaustive-match.rs:27:11
|
||||||
|
@ -62,6 +67,7 @@ LL | match T::A {
|
||||||
| ^^^^ pattern `B` not covered
|
| ^^^^ pattern `B` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `T`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `[]` not covered
|
error[E0004]: non-exhaustive patterns: `[]` not covered
|
||||||
--> $DIR/non-exhaustive-match.rs:38:11
|
--> $DIR/non-exhaustive-match.rs:38:11
|
||||||
|
@ -70,6 +76,7 @@ LL | match *vec {
|
||||||
| ^^^^ pattern `[]` not covered
|
| ^^^^ pattern `[]` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `[std::option::Option<isize>]`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `[_, _, _, _, ..]` not covered
|
error[E0004]: non-exhaustive patterns: `[_, _, _, _, ..]` not covered
|
||||||
--> $DIR/non-exhaustive-match.rs:51:11
|
--> $DIR/non-exhaustive-match.rs:51:11
|
||||||
|
@ -78,6 +85,7 @@ LL | match *vec {
|
||||||
| ^^^^ pattern `[_, _, _, _, ..]` not covered
|
| ^^^^ pattern `[_, _, _, _, ..]` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `[f32]`
|
||||||
|
|
||||||
error: aborting due to 8 previous errors
|
error: aborting due to 8 previous errors
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,7 @@ LL | match (Foo { first: true, second: None }) {
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ pattern `Foo { first: false, second: Some([_, _, _, _]) }` not covered
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ pattern `Foo { first: false, second: Some([_, _, _, _]) }` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `Foo`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `Red` not covered
|
error[E0004]: non-exhaustive patterns: `Red` not covered
|
||||||
--> $DIR/non-exhaustive-pattern-witness.rs:23:11
|
--> $DIR/non-exhaustive-pattern-witness.rs:23:11
|
||||||
|
@ -27,6 +28,7 @@ LL | match Color::Red {
|
||||||
| ^^^^^^^^^^ pattern `Red` not covered
|
| ^^^^^^^^^^ pattern `Red` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `Color`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `East`, `South` and `West` not covered
|
error[E0004]: non-exhaustive patterns: `East`, `South` and `West` not covered
|
||||||
--> $DIR/non-exhaustive-pattern-witness.rs:35:11
|
--> $DIR/non-exhaustive-pattern-witness.rs:35:11
|
||||||
|
@ -44,6 +46,7 @@ LL | match Direction::North {
|
||||||
| ^^^^^^^^^^^^^^^^ patterns `East`, `South` and `West` not covered
|
| ^^^^^^^^^^^^^^^^ patterns `East`, `South` and `West` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `Direction`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `Second`, `Third`, `Fourth` and 8 more not covered
|
error[E0004]: non-exhaustive patterns: `Second`, `Third`, `Fourth` and 8 more not covered
|
||||||
--> $DIR/non-exhaustive-pattern-witness.rs:46:11
|
--> $DIR/non-exhaustive-pattern-witness.rs:46:11
|
||||||
|
@ -57,6 +60,7 @@ LL | match ExcessiveEnum::First {
|
||||||
| ^^^^^^^^^^^^^^^^^^^^ patterns `Second`, `Third`, `Fourth` and 8 more not covered
|
| ^^^^^^^^^^^^^^^^^^^^ patterns `Second`, `Third`, `Fourth` and 8 more not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `ExcessiveEnum`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `CustomRGBA { a: true, .. }` not covered
|
error[E0004]: non-exhaustive patterns: `CustomRGBA { a: true, .. }` not covered
|
||||||
--> $DIR/non-exhaustive-pattern-witness.rs:54:11
|
--> $DIR/non-exhaustive-pattern-witness.rs:54:11
|
||||||
|
@ -73,6 +77,7 @@ LL | match Color::Red {
|
||||||
| ^^^^^^^^^^ pattern `CustomRGBA { a: true, .. }` not covered
|
| ^^^^^^^^^^ pattern `CustomRGBA { a: true, .. }` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `Color`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `[Second(true), Second(false)]` not covered
|
error[E0004]: non-exhaustive patterns: `[Second(true), Second(false)]` not covered
|
||||||
--> $DIR/non-exhaustive-pattern-witness.rs:70:11
|
--> $DIR/non-exhaustive-pattern-witness.rs:70:11
|
||||||
|
@ -81,6 +86,7 @@ LL | match *x {
|
||||||
| ^^ pattern `[Second(true), Second(false)]` not covered
|
| ^^ pattern `[Second(true), Second(false)]` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `[Enum]`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `((), false)` not covered
|
error[E0004]: non-exhaustive patterns: `((), false)` not covered
|
||||||
--> $DIR/non-exhaustive-pattern-witness.rs:83:11
|
--> $DIR/non-exhaustive-pattern-witness.rs:83:11
|
||||||
|
@ -89,6 +95,7 @@ LL | match ((), false) {
|
||||||
| ^^^^^^^^^^^ pattern `((), false)` not covered
|
| ^^^^^^^^^^^ pattern `((), false)` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `((), bool)`
|
||||||
|
|
||||||
error: aborting due to 7 previous errors
|
error: aborting due to 7 previous errors
|
||||||
|
|
||||||
|
|
|
@ -3,6 +3,8 @@ error[E0005]: refutable pattern in function argument: `(_, _)` not covered
|
||||||
|
|
|
|
||||||
LL | fn func((1, (Some(1), 2..=3)): (isize, (Option<isize>, isize))) { }
|
LL | fn func((1, (Some(1), 2..=3)): (isize, (Option<isize>, isize))) { }
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^ pattern `(_, _)` not covered
|
| ^^^^^^^^^^^^^^^^^^^^^ pattern `(_, _)` not covered
|
||||||
|
|
|
||||||
|
= note: the matched value is of type `(isize, (std::option::Option<isize>, isize))`
|
||||||
|
|
||||||
error[E0005]: refutable pattern in local binding: `(std::i32::MIN..=0i32, _)` and `(2i32..=std::i32::MAX, _)` not covered
|
error[E0005]: refutable pattern in local binding: `(std::i32::MIN..=0i32, _)` and `(2i32..=std::i32::MAX, _)` not covered
|
||||||
--> $DIR/refutable-pattern-errors.rs:7:9
|
--> $DIR/refutable-pattern-errors.rs:7:9
|
||||||
|
@ -12,6 +14,7 @@ LL | let (1, (Some(1), 2..=3)) = (1, (None, 2));
|
||||||
|
|
|
|
||||||
= note: `let` bindings require an "irrefutable pattern", like a `struct` or an `enum` with only one variant
|
= note: `let` bindings require an "irrefutable pattern", like a `struct` or an `enum` with only one variant
|
||||||
= note: for more information, visit https://doc.rust-lang.org/book/ch18-02-refutability.html
|
= note: for more information, visit https://doc.rust-lang.org/book/ch18-02-refutability.html
|
||||||
|
= note: the matched value is of type `(i32, (std::option::Option<i32>, i32))`
|
||||||
help: you might want to use `if let` to ignore the variant that isn't matched
|
help: you might want to use `if let` to ignore the variant that isn't matched
|
||||||
|
|
|
|
||||||
LL | if let (1, (Some(1), 2..=3)) = (1, (None, 2)) { /* */ }
|
LL | if let (1, (Some(1), 2..=3)) = (1, (None, 2)) { /* */ }
|
||||||
|
|
|
@ -3,6 +3,8 @@ error[E0005]: refutable pattern in function argument: `_` not covered
|
||||||
|
|
|
|
||||||
LL | let f = |3: isize| println!("hello");
|
LL | let f = |3: isize| println!("hello");
|
||||||
| ^ pattern `_` not covered
|
| ^ pattern `_` not covered
|
||||||
|
|
|
||||||
|
= note: the matched value is of type `isize`
|
||||||
|
|
||||||
error: aborting due to previous error
|
error: aborting due to previous error
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,7 @@ LL | match s2 {
|
||||||
| ^^ pattern `&[false, _]` not covered
|
| ^^ pattern `&[false, _]` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `&[bool; 2]`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `&[false, ..]` not covered
|
error[E0004]: non-exhaustive patterns: `&[false, ..]` not covered
|
||||||
--> $DIR/slice-patterns-exhaustiveness.rs:12:11
|
--> $DIR/slice-patterns-exhaustiveness.rs:12:11
|
||||||
|
@ -13,6 +14,7 @@ LL | match s3 {
|
||||||
| ^^ pattern `&[false, ..]` not covered
|
| ^^ pattern `&[false, ..]` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `&[bool; 3]`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `&[false, ..]` not covered
|
error[E0004]: non-exhaustive patterns: `&[false, ..]` not covered
|
||||||
--> $DIR/slice-patterns-exhaustiveness.rs:16:11
|
--> $DIR/slice-patterns-exhaustiveness.rs:16:11
|
||||||
|
@ -21,6 +23,7 @@ LL | match s10 {
|
||||||
| ^^^ pattern `&[false, ..]` not covered
|
| ^^^ pattern `&[false, ..]` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `&[bool; 10]`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `&[false, true]` not covered
|
error[E0004]: non-exhaustive patterns: `&[false, true]` not covered
|
||||||
--> $DIR/slice-patterns-exhaustiveness.rs:25:11
|
--> $DIR/slice-patterns-exhaustiveness.rs:25:11
|
||||||
|
@ -29,6 +32,7 @@ LL | match s2 {
|
||||||
| ^^ pattern `&[false, true]` not covered
|
| ^^ pattern `&[false, true]` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `&[bool; 2]`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `&[false, .., true]` not covered
|
error[E0004]: non-exhaustive patterns: `&[false, .., true]` not covered
|
||||||
--> $DIR/slice-patterns-exhaustiveness.rs:30:11
|
--> $DIR/slice-patterns-exhaustiveness.rs:30:11
|
||||||
|
@ -37,6 +41,7 @@ LL | match s3 {
|
||||||
| ^^ pattern `&[false, .., true]` not covered
|
| ^^ pattern `&[false, .., true]` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `&[bool; 3]`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `&[false, .., true]` not covered
|
error[E0004]: non-exhaustive patterns: `&[false, .., true]` not covered
|
||||||
--> $DIR/slice-patterns-exhaustiveness.rs:35:11
|
--> $DIR/slice-patterns-exhaustiveness.rs:35:11
|
||||||
|
@ -45,6 +50,7 @@ LL | match s {
|
||||||
| ^ pattern `&[false, .., true]` not covered
|
| ^ pattern `&[false, .., true]` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `&[bool]`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `&[_, ..]` not covered
|
error[E0004]: non-exhaustive patterns: `&[_, ..]` not covered
|
||||||
--> $DIR/slice-patterns-exhaustiveness.rs:42:11
|
--> $DIR/slice-patterns-exhaustiveness.rs:42:11
|
||||||
|
@ -53,6 +59,7 @@ LL | match s {
|
||||||
| ^ pattern `&[_, ..]` not covered
|
| ^ pattern `&[_, ..]` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `&[bool]`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `&[_, _, ..]` not covered
|
error[E0004]: non-exhaustive patterns: `&[_, _, ..]` not covered
|
||||||
--> $DIR/slice-patterns-exhaustiveness.rs:46:11
|
--> $DIR/slice-patterns-exhaustiveness.rs:46:11
|
||||||
|
@ -61,6 +68,7 @@ LL | match s {
|
||||||
| ^ pattern `&[_, _, ..]` not covered
|
| ^ pattern `&[_, _, ..]` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `&[bool]`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `&[false, ..]` not covered
|
error[E0004]: non-exhaustive patterns: `&[false, ..]` not covered
|
||||||
--> $DIR/slice-patterns-exhaustiveness.rs:51:11
|
--> $DIR/slice-patterns-exhaustiveness.rs:51:11
|
||||||
|
@ -69,6 +77,7 @@ LL | match s {
|
||||||
| ^ pattern `&[false, ..]` not covered
|
| ^ pattern `&[false, ..]` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `&[bool]`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `&[false, _, ..]` not covered
|
error[E0004]: non-exhaustive patterns: `&[false, _, ..]` not covered
|
||||||
--> $DIR/slice-patterns-exhaustiveness.rs:56:11
|
--> $DIR/slice-patterns-exhaustiveness.rs:56:11
|
||||||
|
@ -77,6 +86,7 @@ LL | match s {
|
||||||
| ^ pattern `&[false, _, ..]` not covered
|
| ^ pattern `&[false, _, ..]` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `&[bool]`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `&[_, .., false]` not covered
|
error[E0004]: non-exhaustive patterns: `&[_, .., false]` not covered
|
||||||
--> $DIR/slice-patterns-exhaustiveness.rs:62:11
|
--> $DIR/slice-patterns-exhaustiveness.rs:62:11
|
||||||
|
@ -85,6 +95,7 @@ LL | match s {
|
||||||
| ^ pattern `&[_, .., false]` not covered
|
| ^ pattern `&[_, .., false]` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `&[bool]`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `&[_, _, .., true]` not covered
|
error[E0004]: non-exhaustive patterns: `&[_, _, .., true]` not covered
|
||||||
--> $DIR/slice-patterns-exhaustiveness.rs:69:11
|
--> $DIR/slice-patterns-exhaustiveness.rs:69:11
|
||||||
|
@ -93,6 +104,7 @@ LL | match s {
|
||||||
| ^ pattern `&[_, _, .., true]` not covered
|
| ^ pattern `&[_, _, .., true]` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `&[bool]`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `&[true, _, .., _]` not covered
|
error[E0004]: non-exhaustive patterns: `&[true, _, .., _]` not covered
|
||||||
--> $DIR/slice-patterns-exhaustiveness.rs:76:11
|
--> $DIR/slice-patterns-exhaustiveness.rs:76:11
|
||||||
|
@ -101,6 +113,7 @@ LL | match s {
|
||||||
| ^ pattern `&[true, _, .., _]` not covered
|
| ^ pattern `&[true, _, .., _]` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `&[bool]`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `&[..]` not covered
|
error[E0004]: non-exhaustive patterns: `&[..]` not covered
|
||||||
--> $DIR/slice-patterns-exhaustiveness.rs:85:11
|
--> $DIR/slice-patterns-exhaustiveness.rs:85:11
|
||||||
|
@ -109,6 +122,7 @@ LL | match s {
|
||||||
| ^ pattern `&[..]` not covered
|
| ^ pattern `&[..]` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `&[bool]`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `&[true]` not covered
|
error[E0004]: non-exhaustive patterns: `&[true]` not covered
|
||||||
--> $DIR/slice-patterns-exhaustiveness.rs:89:11
|
--> $DIR/slice-patterns-exhaustiveness.rs:89:11
|
||||||
|
@ -117,6 +131,7 @@ LL | match s {
|
||||||
| ^ pattern `&[true]` not covered
|
| ^ pattern `&[true]` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `&[bool]`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `&[false]` not covered
|
error[E0004]: non-exhaustive patterns: `&[false]` not covered
|
||||||
--> $DIR/slice-patterns-exhaustiveness.rs:97:11
|
--> $DIR/slice-patterns-exhaustiveness.rs:97:11
|
||||||
|
@ -125,6 +140,7 @@ LL | match s1 {
|
||||||
| ^^ pattern `&[false]` not covered
|
| ^^ pattern `&[false]` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `&[bool; 1]`
|
||||||
|
|
||||||
error: aborting due to 16 previous errors
|
error: aborting due to 16 previous errors
|
||||||
|
|
||||||
|
|
|
@ -12,6 +12,7 @@ LL | match x {
|
||||||
| ^ pattern `B { x: Some(_) }` not covered
|
| ^ pattern `B { x: Some(_) }` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `A`
|
||||||
|
|
||||||
error: aborting due to previous error
|
error: aborting due to previous error
|
||||||
|
|
||||||
|
|
|
@ -8,6 +8,7 @@ LL | match x {
|
||||||
| ^ pattern `Foo(_, _)` not covered
|
| ^ pattern `Foo(_, _)` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `Foo`
|
||||||
|
|
||||||
error: aborting due to previous error
|
error: aborting due to previous error
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,7 @@ LL | match 0isize {
|
||||||
| ^^^^^^ patterns `std::isize::MIN..=-6isize` and `21isize..=std::isize::MAX` not covered
|
| ^^^^^^ patterns `std::isize::MIN..=-6isize` and `21isize..=std::isize::MAX` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `isize`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `0usize` and `21usize..=std::usize::MAX` not covered
|
error[E0004]: non-exhaustive patterns: `0usize` and `21usize..=std::usize::MAX` not covered
|
||||||
--> $DIR/precise_pointer_size_matching.rs:29:11
|
--> $DIR/precise_pointer_size_matching.rs:29:11
|
||||||
|
@ -13,6 +14,7 @@ LL | match 0usize {
|
||||||
| ^^^^^^ patterns `0usize` and `21usize..=std::usize::MAX` not covered
|
| ^^^^^^ patterns `0usize` and `21usize..=std::usize::MAX` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `usize`
|
||||||
|
|
||||||
error: aborting due to 2 previous errors
|
error: aborting due to 2 previous errors
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,7 @@ LL | Err(#[stable(feature = "rust1", since = "1.0.0")] E),
|
||||||
|
|
|
|
||||||
= note: `let` bindings require an "irrefutable pattern", like a `struct` or an `enum` with only one variant
|
= note: `let` bindings require an "irrefutable pattern", like a `struct` or an `enum` with only one variant
|
||||||
= note: for more information, visit https://doc.rust-lang.org/book/ch18-02-refutability.html
|
= note: for more information, visit https://doc.rust-lang.org/book/ch18-02-refutability.html
|
||||||
|
= note: the matched value is of type `std::result::Result<u32, &R>`
|
||||||
help: you might want to use `if let` to ignore the variant that isn't matched
|
help: you might want to use `if let` to ignore the variant that isn't matched
|
||||||
|
|
|
|
||||||
LL | if let Ok(x) = res { /* */ }
|
LL | if let Ok(x) = res { /* */ }
|
||||||
|
|
|
@ -5,6 +5,7 @@ LL | match sl {
|
||||||
| ^^ pattern `&[]` not covered
|
| ^^ pattern `&[]` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `&[u8]`
|
||||||
|
|
||||||
error: aborting due to previous error
|
error: aborting due to previous error
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,7 @@ LL | match x {}
|
||||||
| ^
|
| ^
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `enums::EmptyNonExhaustiveEnum`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `_` not covered
|
error[E0004]: non-exhaustive patterns: `_` not covered
|
||||||
--> $DIR/enum.rs:16:11
|
--> $DIR/enum.rs:16:11
|
||||||
|
@ -13,6 +14,7 @@ LL | match enum_unit {
|
||||||
| ^^^^^^^^^ pattern `_` not covered
|
| ^^^^^^^^^ pattern `_` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `enums::NonExhaustiveEnum`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `_` not covered
|
error[E0004]: non-exhaustive patterns: `_` not covered
|
||||||
--> $DIR/enum.rs:23:11
|
--> $DIR/enum.rs:23:11
|
||||||
|
@ -21,6 +23,7 @@ LL | match enum_unit {};
|
||||||
| ^^^^^^^^^ pattern `_` not covered
|
| ^^^^^^^^^ pattern `_` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `enums::NonExhaustiveEnum`
|
||||||
|
|
||||||
error: aborting due to 3 previous errors
|
error: aborting due to 3 previous errors
|
||||||
|
|
||||||
|
|
|
@ -18,6 +18,7 @@ LL | match NonExhaustiveEnum::Unit {}
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^ patterns `Unit`, `Tuple(_)` and `Struct { .. }` not covered
|
| ^^^^^^^^^^^^^^^^^^^^^^^ patterns `Unit`, `Tuple(_)` and `Struct { .. }` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `NonExhaustiveEnum`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `Unit`, `Tuple(_)` and `Struct { .. }` not covered
|
error[E0004]: non-exhaustive patterns: `Unit`, `Tuple(_)` and `Struct { .. }` not covered
|
||||||
--> $DIR/enum_same_crate_empty_match.rs:35:11
|
--> $DIR/enum_same_crate_empty_match.rs:35:11
|
||||||
|
@ -39,6 +40,7 @@ LL | match NormalEnum::Unit {}
|
||||||
| ^^^^^^^^^^^^^^^^ patterns `Unit`, `Tuple(_)` and `Struct { .. }` not covered
|
| ^^^^^^^^^^^^^^^^ patterns `Unit`, `Tuple(_)` and `Struct { .. }` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `NormalEnum`
|
||||||
|
|
||||||
error: aborting due to 2 previous errors
|
error: aborting due to 2 previous errors
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,7 @@ LL | match x {}
|
||||||
| ^
|
| ^
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `uninhabited::IndirectUninhabitedEnum`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: type `uninhabited::IndirectUninhabitedStruct` is non-empty
|
error[E0004]: non-exhaustive patterns: type `uninhabited::IndirectUninhabitedStruct` is non-empty
|
||||||
--> $DIR/indirect_match.rs:23:11
|
--> $DIR/indirect_match.rs:23:11
|
||||||
|
@ -13,6 +14,7 @@ LL | match x {}
|
||||||
| ^
|
| ^
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `uninhabited::IndirectUninhabitedStruct`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: type `uninhabited::IndirectUninhabitedTupleStruct` is non-empty
|
error[E0004]: non-exhaustive patterns: type `uninhabited::IndirectUninhabitedTupleStruct` is non-empty
|
||||||
--> $DIR/indirect_match.rs:27:11
|
--> $DIR/indirect_match.rs:27:11
|
||||||
|
@ -21,6 +23,7 @@ LL | match x {}
|
||||||
| ^
|
| ^
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `uninhabited::IndirectUninhabitedTupleStruct`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: type `uninhabited::IndirectUninhabitedVariants` is non-empty
|
error[E0004]: non-exhaustive patterns: type `uninhabited::IndirectUninhabitedVariants` is non-empty
|
||||||
--> $DIR/indirect_match.rs:33:11
|
--> $DIR/indirect_match.rs:33:11
|
||||||
|
@ -29,6 +32,7 @@ LL | match x {}
|
||||||
| ^
|
| ^
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `uninhabited::IndirectUninhabitedVariants`
|
||||||
|
|
||||||
error: aborting due to 4 previous errors
|
error: aborting due to 4 previous errors
|
||||||
|
|
||||||
|
|
|
@ -8,6 +8,7 @@ LL | match x {}
|
||||||
| ^
|
| ^
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `IndirectUninhabitedEnum`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: type `IndirectUninhabitedStruct` is non-empty
|
error[E0004]: non-exhaustive patterns: type `IndirectUninhabitedStruct` is non-empty
|
||||||
--> $DIR/indirect_match_same_crate.rs:38:11
|
--> $DIR/indirect_match_same_crate.rs:38:11
|
||||||
|
@ -19,6 +20,7 @@ LL | match x {}
|
||||||
| ^
|
| ^
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `IndirectUninhabitedStruct`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: type `IndirectUninhabitedTupleStruct` is non-empty
|
error[E0004]: non-exhaustive patterns: type `IndirectUninhabitedTupleStruct` is non-empty
|
||||||
--> $DIR/indirect_match_same_crate.rs:42:11
|
--> $DIR/indirect_match_same_crate.rs:42:11
|
||||||
|
@ -30,6 +32,7 @@ LL | match x {}
|
||||||
| ^
|
| ^
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `IndirectUninhabitedTupleStruct`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: type `IndirectUninhabitedVariants` is non-empty
|
error[E0004]: non-exhaustive patterns: type `IndirectUninhabitedVariants` is non-empty
|
||||||
--> $DIR/indirect_match_same_crate.rs:48:11
|
--> $DIR/indirect_match_same_crate.rs:48:11
|
||||||
|
@ -41,6 +44,7 @@ LL | match x {}
|
||||||
| ^
|
| ^
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `IndirectUninhabitedVariants`
|
||||||
|
|
||||||
error: aborting due to 4 previous errors
|
error: aborting due to 4 previous errors
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,7 @@ LL | match x {}
|
||||||
| ^
|
| ^
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `uninhabited::IndirectUninhabitedEnum`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: type `uninhabited::IndirectUninhabitedStruct` is non-empty
|
error[E0004]: non-exhaustive patterns: type `uninhabited::IndirectUninhabitedStruct` is non-empty
|
||||||
--> $DIR/indirect_match_with_exhaustive_patterns.rs:27:11
|
--> $DIR/indirect_match_with_exhaustive_patterns.rs:27:11
|
||||||
|
@ -13,6 +14,7 @@ LL | match x {}
|
||||||
| ^
|
| ^
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `uninhabited::IndirectUninhabitedStruct`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: type `uninhabited::IndirectUninhabitedTupleStruct` is non-empty
|
error[E0004]: non-exhaustive patterns: type `uninhabited::IndirectUninhabitedTupleStruct` is non-empty
|
||||||
--> $DIR/indirect_match_with_exhaustive_patterns.rs:31:11
|
--> $DIR/indirect_match_with_exhaustive_patterns.rs:31:11
|
||||||
|
@ -21,6 +23,7 @@ LL | match x {}
|
||||||
| ^
|
| ^
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `uninhabited::IndirectUninhabitedTupleStruct`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: type `uninhabited::IndirectUninhabitedVariants` is non-empty
|
error[E0004]: non-exhaustive patterns: type `uninhabited::IndirectUninhabitedVariants` is non-empty
|
||||||
--> $DIR/indirect_match_with_exhaustive_patterns.rs:37:11
|
--> $DIR/indirect_match_with_exhaustive_patterns.rs:37:11
|
||||||
|
@ -29,6 +32,7 @@ LL | match x {}
|
||||||
| ^
|
| ^
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `uninhabited::IndirectUninhabitedVariants`
|
||||||
|
|
||||||
error: aborting due to 4 previous errors
|
error: aborting due to 4 previous errors
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,7 @@ LL | match x {}
|
||||||
| ^
|
| ^
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `uninhabited::UninhabitedEnum`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: type `uninhabited::UninhabitedStruct` is non-empty
|
error[E0004]: non-exhaustive patterns: type `uninhabited::UninhabitedStruct` is non-empty
|
||||||
--> $DIR/match.rs:23:11
|
--> $DIR/match.rs:23:11
|
||||||
|
@ -13,6 +14,7 @@ LL | match x {}
|
||||||
| ^
|
| ^
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `uninhabited::UninhabitedStruct`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: type `uninhabited::UninhabitedTupleStruct` is non-empty
|
error[E0004]: non-exhaustive patterns: type `uninhabited::UninhabitedTupleStruct` is non-empty
|
||||||
--> $DIR/match.rs:27:11
|
--> $DIR/match.rs:27:11
|
||||||
|
@ -21,6 +23,7 @@ LL | match x {}
|
||||||
| ^
|
| ^
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `uninhabited::UninhabitedTupleStruct`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `Tuple(_)` and `Struct { .. }` not covered
|
error[E0004]: non-exhaustive patterns: `Tuple(_)` and `Struct { .. }` not covered
|
||||||
--> $DIR/match.rs:31:11
|
--> $DIR/match.rs:31:11
|
||||||
|
@ -36,6 +39,7 @@ LL | #[non_exhaustive] Struct { x: ! }
|
||||||
| ------ not covered
|
| ------ not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `uninhabited::UninhabitedVariants`
|
||||||
|
|
||||||
error: aborting due to 4 previous errors
|
error: aborting due to 4 previous errors
|
||||||
|
|
||||||
|
|
|
@ -10,6 +10,7 @@ LL | match x {}
|
||||||
| ^
|
| ^
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `UninhabitedStruct`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: type `UninhabitedTupleStruct` is non-empty
|
error[E0004]: non-exhaustive patterns: type `UninhabitedTupleStruct` is non-empty
|
||||||
--> $DIR/match_same_crate.rs:34:11
|
--> $DIR/match_same_crate.rs:34:11
|
||||||
|
@ -21,6 +22,7 @@ LL | match x {}
|
||||||
| ^
|
| ^
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `UninhabitedTupleStruct`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `Tuple(_)` and `Struct { .. }` not covered
|
error[E0004]: non-exhaustive patterns: `Tuple(_)` and `Struct { .. }` not covered
|
||||||
--> $DIR/match_same_crate.rs:38:11
|
--> $DIR/match_same_crate.rs:38:11
|
||||||
|
@ -37,6 +39,7 @@ LL | match x {}
|
||||||
| ^ patterns `Tuple(_)` and `Struct { .. }` not covered
|
| ^ patterns `Tuple(_)` and `Struct { .. }` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `UninhabitedVariants`
|
||||||
|
|
||||||
error: aborting due to 3 previous errors
|
error: aborting due to 3 previous errors
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,7 @@ LL | match x {}
|
||||||
| ^
|
| ^
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `uninhabited::UninhabitedEnum`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: type `uninhabited::UninhabitedStruct` is non-empty
|
error[E0004]: non-exhaustive patterns: type `uninhabited::UninhabitedStruct` is non-empty
|
||||||
--> $DIR/match_with_exhaustive_patterns.rs:26:11
|
--> $DIR/match_with_exhaustive_patterns.rs:26:11
|
||||||
|
@ -13,6 +14,7 @@ LL | match x {}
|
||||||
| ^
|
| ^
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `uninhabited::UninhabitedStruct`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: type `uninhabited::UninhabitedTupleStruct` is non-empty
|
error[E0004]: non-exhaustive patterns: type `uninhabited::UninhabitedTupleStruct` is non-empty
|
||||||
--> $DIR/match_with_exhaustive_patterns.rs:30:11
|
--> $DIR/match_with_exhaustive_patterns.rs:30:11
|
||||||
|
@ -21,6 +23,7 @@ LL | match x {}
|
||||||
| ^
|
| ^
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `uninhabited::UninhabitedTupleStruct`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `Tuple(_)` and `Struct { .. }` not covered
|
error[E0004]: non-exhaustive patterns: `Tuple(_)` and `Struct { .. }` not covered
|
||||||
--> $DIR/match_with_exhaustive_patterns.rs:34:11
|
--> $DIR/match_with_exhaustive_patterns.rs:34:11
|
||||||
|
@ -36,6 +39,7 @@ LL | #[non_exhaustive] Struct { x: ! }
|
||||||
| ------ not covered
|
| ------ not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `uninhabited::UninhabitedVariants`
|
||||||
|
|
||||||
error: aborting due to 4 previous errors
|
error: aborting due to 4 previous errors
|
||||||
|
|
||||||
|
|
|
@ -9,6 +9,8 @@ LL | let A = 3;
|
||||||
...
|
...
|
||||||
LL | const A: i32 = 2;
|
LL | const A: i32 = 2;
|
||||||
| ----------------- constant defined here
|
| ----------------- constant defined here
|
||||||
|
|
|
||||||
|
= note: the matched value is of type `i32`
|
||||||
|
|
||||||
error: aborting due to previous error
|
error: aborting due to previous error
|
||||||
|
|
||||||
|
|
|
@ -15,6 +15,7 @@ LL | let Foo::D(_y) = x;
|
||||||
|
|
|
|
||||||
= note: `let` bindings require an "irrefutable pattern", like a `struct` or an `enum` with only one variant
|
= note: `let` bindings require an "irrefutable pattern", like a `struct` or an `enum` with only one variant
|
||||||
= note: for more information, visit https://doc.rust-lang.org/book/ch18-02-refutability.html
|
= note: for more information, visit https://doc.rust-lang.org/book/ch18-02-refutability.html
|
||||||
|
= note: the matched value is of type `Foo`
|
||||||
help: you might want to use `if let` to ignore the variant that isn't matched
|
help: you might want to use `if let` to ignore the variant that isn't matched
|
||||||
|
|
|
|
||||||
LL | if let Foo::D(_y) = x { /* */ }
|
LL | if let Foo::D(_y) = x { /* */ }
|
||||||
|
|
|
@ -10,6 +10,7 @@ LL | Err(#[stable(feature = "rust1", since = "1.0.0")] E),
|
||||||
| --- not covered
|
| --- not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `std::result::Result<u32, &Void>`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: type `&Void` is non-empty
|
error[E0004]: non-exhaustive patterns: type `&Void` is non-empty
|
||||||
--> $DIR/uninhabited-matches-feature-gated.rs:20:19
|
--> $DIR/uninhabited-matches-feature-gated.rs:20:19
|
||||||
|
@ -21,6 +22,7 @@ LL | let _ = match x {};
|
||||||
| ^
|
| ^
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `&Void`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: type `(Void,)` is non-empty
|
error[E0004]: non-exhaustive patterns: type `(Void,)` is non-empty
|
||||||
--> $DIR/uninhabited-matches-feature-gated.rs:23:19
|
--> $DIR/uninhabited-matches-feature-gated.rs:23:19
|
||||||
|
@ -29,6 +31,7 @@ LL | let _ = match x {};
|
||||||
| ^
|
| ^
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `(Void,)`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: type `[Void; 1]` is non-empty
|
error[E0004]: non-exhaustive patterns: type `[Void; 1]` is non-empty
|
||||||
--> $DIR/uninhabited-matches-feature-gated.rs:26:19
|
--> $DIR/uninhabited-matches-feature-gated.rs:26:19
|
||||||
|
@ -37,6 +40,7 @@ LL | let _ = match x {};
|
||||||
| ^
|
| ^
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `[Void; 1]`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `&[_, ..]` not covered
|
error[E0004]: non-exhaustive patterns: `&[_, ..]` not covered
|
||||||
--> $DIR/uninhabited-matches-feature-gated.rs:29:19
|
--> $DIR/uninhabited-matches-feature-gated.rs:29:19
|
||||||
|
@ -45,6 +49,7 @@ LL | let _ = match x {
|
||||||
| ^ pattern `&[_, ..]` not covered
|
| ^ pattern `&[_, ..]` not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `&[Void]`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `Err(_)` not covered
|
error[E0004]: non-exhaustive patterns: `Err(_)` not covered
|
||||||
--> $DIR/uninhabited-matches-feature-gated.rs:37:19
|
--> $DIR/uninhabited-matches-feature-gated.rs:37:19
|
||||||
|
@ -58,6 +63,7 @@ LL | Err(#[stable(feature = "rust1", since = "1.0.0")] E),
|
||||||
| --- not covered
|
| --- not covered
|
||||||
|
|
|
|
||||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||||
|
= note: the matched value is of type `std::result::Result<u32, Void>`
|
||||||
|
|
||||||
error[E0005]: refutable pattern in local binding: `Err(_)` not covered
|
error[E0005]: refutable pattern in local binding: `Err(_)` not covered
|
||||||
--> $DIR/uninhabited-matches-feature-gated.rs:42:9
|
--> $DIR/uninhabited-matches-feature-gated.rs:42:9
|
||||||
|
@ -72,6 +78,7 @@ LL | Err(#[stable(feature = "rust1", since = "1.0.0")] E),
|
||||||
|
|
|
|
||||||
= note: `let` bindings require an "irrefutable pattern", like a `struct` or an `enum` with only one variant
|
= note: `let` bindings require an "irrefutable pattern", like a `struct` or an `enum` with only one variant
|
||||||
= note: for more information, visit https://doc.rust-lang.org/book/ch18-02-refutability.html
|
= note: for more information, visit https://doc.rust-lang.org/book/ch18-02-refutability.html
|
||||||
|
= note: the matched value is of type `std::result::Result<u32, Void>`
|
||||||
help: you might want to use `if let` to ignore the variant that isn't matched
|
help: you might want to use `if let` to ignore the variant that isn't matched
|
||||||
|
|
|
|
||||||
LL | if let Ok(x) = x { /* */ }
|
LL | if let Ok(x) = x { /* */ }
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue