mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 07:14:28 +00:00
Auto merge of #85891 - bjorn3:revert_merge_crate_disambiguator, r=Mark-Simulacrum
Revert "Merge CrateDisambiguator into StableCrateId" This reverts https://github.com/rust-lang/rust/pull/85804
This commit is contained in:
commit
2312ff1a85
@ -14,6 +14,7 @@ use rustc_data_structures::fx::FxHashMap;
|
|||||||
use rustc_data_structures::stable_hasher::StableHasher;
|
use rustc_data_structures::stable_hasher::StableHasher;
|
||||||
use rustc_data_structures::unhash::UnhashMap;
|
use rustc_data_structures::unhash::UnhashMap;
|
||||||
use rustc_index::vec::IndexVec;
|
use rustc_index::vec::IndexVec;
|
||||||
|
use rustc_span::crate_disambiguator::CrateDisambiguator;
|
||||||
use rustc_span::hygiene::ExpnId;
|
use rustc_span::hygiene::ExpnId;
|
||||||
use rustc_span::symbol::{kw, sym, Symbol};
|
use rustc_span::symbol::{kw, sym, Symbol};
|
||||||
|
|
||||||
@ -338,7 +339,7 @@ impl Definitions {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Adds a root definition (no parent) and a few other reserved definitions.
|
/// Adds a root definition (no parent) and a few other reserved definitions.
|
||||||
pub fn new(stable_crate_id: StableCrateId) -> Definitions {
|
pub fn new(crate_name: &str, crate_disambiguator: CrateDisambiguator) -> Definitions {
|
||||||
let key = DefKey {
|
let key = DefKey {
|
||||||
parent: None,
|
parent: None,
|
||||||
disambiguated_data: DisambiguatedDefPathData {
|
disambiguated_data: DisambiguatedDefPathData {
|
||||||
@ -347,6 +348,7 @@ impl Definitions {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
let stable_crate_id = StableCrateId::new(crate_name, crate_disambiguator);
|
||||||
let parent_hash = DefPathHash::new(stable_crate_id, 0);
|
let parent_hash = DefPathHash::new(stable_crate_id, 0);
|
||||||
let def_path_hash = key.compute_stable_hash(parent_hash);
|
let def_path_hash = key.compute_stable_hash(parent_hash);
|
||||||
|
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
use crate::definitions::{DefKey, DefPathData, DisambiguatedDefPathData};
|
use crate::definitions::{DefKey, DefPathData, DisambiguatedDefPathData};
|
||||||
|
use rustc_data_structures::fingerprint::Fingerprint;
|
||||||
|
use rustc_span::crate_disambiguator::CrateDisambiguator;
|
||||||
use rustc_span::def_id::{DefPathHash, StableCrateId};
|
use rustc_span::def_id::{DefPathHash, StableCrateId};
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
@ -11,16 +13,17 @@ fn def_path_hash_depends_on_crate_id() {
|
|||||||
// the crate by changing the crate disambiguator (e.g. via bumping the
|
// the crate by changing the crate disambiguator (e.g. via bumping the
|
||||||
// crate's version number).
|
// crate's version number).
|
||||||
|
|
||||||
let id0 = StableCrateId::new("foo", false, vec!["1".to_string()]);
|
let d0 = CrateDisambiguator::from(Fingerprint::new(12, 34));
|
||||||
let id1 = StableCrateId::new("foo", false, vec!["2".to_string()]);
|
let d1 = CrateDisambiguator::from(Fingerprint::new(56, 78));
|
||||||
|
|
||||||
let h0 = mk_test_hash(id0);
|
let h0 = mk_test_hash("foo", d0);
|
||||||
let h1 = mk_test_hash(id1);
|
let h1 = mk_test_hash("foo", d1);
|
||||||
|
|
||||||
assert_ne!(h0.stable_crate_id(), h1.stable_crate_id());
|
assert_ne!(h0.stable_crate_id(), h1.stable_crate_id());
|
||||||
assert_ne!(h0.local_hash(), h1.local_hash());
|
assert_ne!(h0.local_hash(), h1.local_hash());
|
||||||
|
|
||||||
fn mk_test_hash(stable_crate_id: StableCrateId) -> DefPathHash {
|
fn mk_test_hash(crate_name: &str, crate_disambiguator: CrateDisambiguator) -> DefPathHash {
|
||||||
|
let stable_crate_id = StableCrateId::new(crate_name, crate_disambiguator);
|
||||||
let parent_hash = DefPathHash::new(stable_crate_id, 0);
|
let parent_hash = DefPathHash::new(stable_crate_id, 0);
|
||||||
|
|
||||||
let key = DefKey {
|
let key = DefKey {
|
||||||
|
@ -108,7 +108,7 @@ use rustc_data_structures::svh::Svh;
|
|||||||
use rustc_data_structures::{base_n, flock};
|
use rustc_data_structures::{base_n, flock};
|
||||||
use rustc_errors::ErrorReported;
|
use rustc_errors::ErrorReported;
|
||||||
use rustc_fs_util::{link_or_copy, LinkOrCopy};
|
use rustc_fs_util::{link_or_copy, LinkOrCopy};
|
||||||
use rustc_session::{Session, StableCrateId};
|
use rustc_session::{CrateDisambiguator, Session};
|
||||||
|
|
||||||
use std::fs as std_fs;
|
use std::fs as std_fs;
|
||||||
use std::io;
|
use std::io;
|
||||||
@ -189,7 +189,7 @@ pub fn in_incr_comp_dir(incr_comp_session_dir: &Path, file_name: &str) -> PathBu
|
|||||||
pub fn prepare_session_directory(
|
pub fn prepare_session_directory(
|
||||||
sess: &Session,
|
sess: &Session,
|
||||||
crate_name: &str,
|
crate_name: &str,
|
||||||
stable_crate_id: StableCrateId,
|
crate_disambiguator: CrateDisambiguator,
|
||||||
) -> Result<(), ErrorReported> {
|
) -> Result<(), ErrorReported> {
|
||||||
if sess.opts.incremental.is_none() {
|
if sess.opts.incremental.is_none() {
|
||||||
return Ok(());
|
return Ok(());
|
||||||
@ -200,7 +200,7 @@ pub fn prepare_session_directory(
|
|||||||
debug!("prepare_session_directory");
|
debug!("prepare_session_directory");
|
||||||
|
|
||||||
// {incr-comp-dir}/{crate-name-and-disambiguator}
|
// {incr-comp-dir}/{crate-name-and-disambiguator}
|
||||||
let crate_dir = crate_path(sess, crate_name, stable_crate_id);
|
let crate_dir = crate_path(sess, crate_name, crate_disambiguator);
|
||||||
debug!("crate-dir: {}", crate_dir.display());
|
debug!("crate-dir: {}", crate_dir.display());
|
||||||
create_dir(sess, &crate_dir, "crate")?;
|
create_dir(sess, &crate_dir, "crate")?;
|
||||||
|
|
||||||
@ -648,12 +648,19 @@ fn string_to_timestamp(s: &str) -> Result<SystemTime, ()> {
|
|||||||
Ok(UNIX_EPOCH + duration)
|
Ok(UNIX_EPOCH + duration)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn crate_path(sess: &Session, crate_name: &str, stable_crate_id: StableCrateId) -> PathBuf {
|
fn crate_path(
|
||||||
|
sess: &Session,
|
||||||
|
crate_name: &str,
|
||||||
|
crate_disambiguator: CrateDisambiguator,
|
||||||
|
) -> PathBuf {
|
||||||
let incr_dir = sess.opts.incremental.as_ref().unwrap().clone();
|
let incr_dir = sess.opts.incremental.as_ref().unwrap().clone();
|
||||||
|
|
||||||
let stable_crate_id = base_n::encode(stable_crate_id.to_u64() as u128, INT_ENCODE_BASE);
|
// The full crate disambiguator is really long. 64 bits of it should be
|
||||||
|
// sufficient.
|
||||||
|
let crate_disambiguator = crate_disambiguator.to_fingerprint().to_smaller_hash();
|
||||||
|
let crate_disambiguator = base_n::encode(crate_disambiguator as u128, INT_ENCODE_BASE);
|
||||||
|
|
||||||
let crate_name = format!("{}-{}", crate_name, stable_crate_id);
|
let crate_name = format!("{}-{}", crate_name, crate_disambiguator);
|
||||||
incr_dir.join(crate_name)
|
incr_dir.join(crate_name)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@ use rustc_data_structures::temp_dir::MaybeTempDir;
|
|||||||
use rustc_data_structures::{box_region_allow_access, declare_box_region_type, parallel};
|
use rustc_data_structures::{box_region_allow_access, declare_box_region_type, parallel};
|
||||||
use rustc_errors::{ErrorReported, PResult};
|
use rustc_errors::{ErrorReported, PResult};
|
||||||
use rustc_expand::base::ExtCtxt;
|
use rustc_expand::base::ExtCtxt;
|
||||||
use rustc_hir::def_id::{StableCrateId, LOCAL_CRATE};
|
use rustc_hir::def_id::LOCAL_CRATE;
|
||||||
use rustc_hir::Crate;
|
use rustc_hir::Crate;
|
||||||
use rustc_lint::LintStore;
|
use rustc_lint::LintStore;
|
||||||
use rustc_metadata::creader::CStore;
|
use rustc_metadata::creader::CStore;
|
||||||
@ -170,13 +170,9 @@ pub fn register_plugins<'a>(
|
|||||||
let crate_types = util::collect_crate_types(sess, &krate.attrs);
|
let crate_types = util::collect_crate_types(sess, &krate.attrs);
|
||||||
sess.init_crate_types(crate_types);
|
sess.init_crate_types(crate_types);
|
||||||
|
|
||||||
let stable_crate_id = StableCrateId::new(
|
let disambiguator = util::compute_crate_disambiguator(sess);
|
||||||
crate_name,
|
sess.crate_disambiguator.set(disambiguator).expect("not yet initialized");
|
||||||
sess.crate_types().contains(&CrateType::Executable),
|
rustc_incremental::prepare_session_directory(sess, &crate_name, disambiguator)?;
|
||||||
sess.opts.cg.metadata.clone(),
|
|
||||||
);
|
|
||||||
sess.stable_crate_id.set(stable_crate_id).expect("not yet initialized");
|
|
||||||
rustc_incremental::prepare_session_directory(sess, &crate_name, stable_crate_id)?;
|
|
||||||
|
|
||||||
if sess.opts.incremental.is_some() {
|
if sess.opts.incremental.is_some() {
|
||||||
sess.time("incr_comp_garbage_collect_session_directories", || {
|
sess.time("incr_comp_garbage_collect_session_directories", || {
|
||||||
|
@ -2,9 +2,11 @@ use rustc_ast::mut_visit::{visit_clobber, MutVisitor, *};
|
|||||||
use rustc_ast::ptr::P;
|
use rustc_ast::ptr::P;
|
||||||
use rustc_ast::{self as ast, AttrVec, BlockCheckMode};
|
use rustc_ast::{self as ast, AttrVec, BlockCheckMode};
|
||||||
use rustc_codegen_ssa::traits::CodegenBackend;
|
use rustc_codegen_ssa::traits::CodegenBackend;
|
||||||
|
use rustc_data_structures::fingerprint::Fingerprint;
|
||||||
use rustc_data_structures::fx::{FxHashMap, FxHashSet};
|
use rustc_data_structures::fx::{FxHashMap, FxHashSet};
|
||||||
#[cfg(parallel_compiler)]
|
#[cfg(parallel_compiler)]
|
||||||
use rustc_data_structures::jobserver;
|
use rustc_data_structures::jobserver;
|
||||||
|
use rustc_data_structures::stable_hasher::StableHasher;
|
||||||
use rustc_data_structures::sync::Lrc;
|
use rustc_data_structures::sync::Lrc;
|
||||||
use rustc_errors::registry::Registry;
|
use rustc_errors::registry::Registry;
|
||||||
use rustc_metadata::dynamic_lib::DynamicLibrary;
|
use rustc_metadata::dynamic_lib::DynamicLibrary;
|
||||||
@ -16,6 +18,7 @@ use rustc_session::config::{self, CrateType};
|
|||||||
use rustc_session::config::{ErrorOutputType, Input, OutputFilenames};
|
use rustc_session::config::{ErrorOutputType, Input, OutputFilenames};
|
||||||
use rustc_session::lint::{self, BuiltinLintDiagnostics, LintBuffer};
|
use rustc_session::lint::{self, BuiltinLintDiagnostics, LintBuffer};
|
||||||
use rustc_session::parse::CrateConfig;
|
use rustc_session::parse::CrateConfig;
|
||||||
|
use rustc_session::CrateDisambiguator;
|
||||||
use rustc_session::{early_error, filesearch, output, DiagnosticOutput, Session};
|
use rustc_session::{early_error, filesearch, output, DiagnosticOutput, Session};
|
||||||
use rustc_span::edition::Edition;
|
use rustc_span::edition::Edition;
|
||||||
use rustc_span::lev_distance::find_best_match_for_name;
|
use rustc_span::lev_distance::find_best_match_for_name;
|
||||||
@ -484,6 +487,39 @@ pub fn get_codegen_sysroot(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub(crate) fn compute_crate_disambiguator(session: &Session) -> CrateDisambiguator {
|
||||||
|
use std::hash::Hasher;
|
||||||
|
|
||||||
|
// The crate_disambiguator is a 128 bit hash. The disambiguator is fed
|
||||||
|
// into various other hashes quite a bit (symbol hashes, incr. comp. hashes,
|
||||||
|
// debuginfo type IDs, etc), so we don't want it to be too wide. 128 bits
|
||||||
|
// should still be safe enough to avoid collisions in practice.
|
||||||
|
let mut hasher = StableHasher::new();
|
||||||
|
|
||||||
|
let mut metadata = session.opts.cg.metadata.clone();
|
||||||
|
// We don't want the crate_disambiguator to dependent on the order
|
||||||
|
// -C metadata arguments, so sort them:
|
||||||
|
metadata.sort();
|
||||||
|
// Every distinct -C metadata value is only incorporated once:
|
||||||
|
metadata.dedup();
|
||||||
|
|
||||||
|
hasher.write(b"metadata");
|
||||||
|
for s in &metadata {
|
||||||
|
// Also incorporate the length of a metadata string, so that we generate
|
||||||
|
// different values for `-Cmetadata=ab -Cmetadata=c` and
|
||||||
|
// `-Cmetadata=a -Cmetadata=bc`
|
||||||
|
hasher.write_usize(s.len());
|
||||||
|
hasher.write(s.as_bytes());
|
||||||
|
}
|
||||||
|
|
||||||
|
// Also incorporate crate type, so that we don't get symbol conflicts when
|
||||||
|
// linking against a library of the same name, if this is an executable.
|
||||||
|
let is_exe = session.crate_types().contains(&CrateType::Executable);
|
||||||
|
hasher.write(if is_exe { b"exe" } else { b"lib" });
|
||||||
|
|
||||||
|
CrateDisambiguator::from(hasher.finish::<Fingerprint>())
|
||||||
|
}
|
||||||
|
|
||||||
pub(crate) fn check_attr_crate_type(
|
pub(crate) fn check_attr_crate_type(
|
||||||
sess: &Session,
|
sess: &Session,
|
||||||
attrs: &[ast::Attribute],
|
attrs: &[ast::Attribute],
|
||||||
|
@ -21,7 +21,7 @@ use rustc_session::config::{self, CrateType, ExternLocation};
|
|||||||
use rustc_session::lint::{self, BuiltinLintDiagnostics, ExternDepSpec};
|
use rustc_session::lint::{self, BuiltinLintDiagnostics, ExternDepSpec};
|
||||||
use rustc_session::output::validate_crate_name;
|
use rustc_session::output::validate_crate_name;
|
||||||
use rustc_session::search_paths::PathKind;
|
use rustc_session::search_paths::PathKind;
|
||||||
use rustc_session::Session;
|
use rustc_session::{CrateDisambiguator, Session};
|
||||||
use rustc_span::edition::Edition;
|
use rustc_span::edition::Edition;
|
||||||
use rustc_span::symbol::{sym, Symbol};
|
use rustc_span::symbol::{sym, Symbol};
|
||||||
use rustc_span::{Span, DUMMY_SP};
|
use rustc_span::{Span, DUMMY_SP};
|
||||||
@ -222,8 +222,10 @@ impl<'a> CrateLoader<'a> {
|
|||||||
metadata_loader: &'a MetadataLoaderDyn,
|
metadata_loader: &'a MetadataLoaderDyn,
|
||||||
local_crate_name: &str,
|
local_crate_name: &str,
|
||||||
) -> Self {
|
) -> Self {
|
||||||
|
let local_crate_stable_id =
|
||||||
|
StableCrateId::new(local_crate_name, sess.local_crate_disambiguator());
|
||||||
let mut stable_crate_ids = FxHashMap::default();
|
let mut stable_crate_ids = FxHashMap::default();
|
||||||
stable_crate_ids.insert(sess.local_stable_crate_id(), LOCAL_CRATE);
|
stable_crate_ids.insert(local_crate_stable_id, LOCAL_CRATE);
|
||||||
|
|
||||||
CrateLoader {
|
CrateLoader {
|
||||||
sess,
|
sess,
|
||||||
@ -325,14 +327,17 @@ impl<'a> CrateLoader<'a> {
|
|||||||
|
|
||||||
fn verify_no_symbol_conflicts(&self, root: &CrateRoot<'_>) -> Result<(), CrateError> {
|
fn verify_no_symbol_conflicts(&self, root: &CrateRoot<'_>) -> Result<(), CrateError> {
|
||||||
// Check for (potential) conflicts with the local crate
|
// Check for (potential) conflicts with the local crate
|
||||||
if self.sess.local_stable_crate_id() == root.stable_crate_id() {
|
if self.local_crate_name == root.name()
|
||||||
|
&& self.sess.local_crate_disambiguator() == root.disambiguator()
|
||||||
|
{
|
||||||
return Err(CrateError::SymbolConflictsCurrent(root.name()));
|
return Err(CrateError::SymbolConflictsCurrent(root.name()));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check for conflicts with any crate loaded so far
|
// Check for conflicts with any crate loaded so far
|
||||||
let mut res = Ok(());
|
let mut res = Ok(());
|
||||||
self.cstore.iter_crate_data(|_, other| {
|
self.cstore.iter_crate_data(|_, other| {
|
||||||
if other.stable_crate_id() == root.stable_crate_id() && // same stable crate id
|
if other.name() == root.name() && // same crate-name
|
||||||
|
other.disambiguator() == root.disambiguator() && // same crate-disambiguator
|
||||||
other.hash() != root.hash()
|
other.hash() != root.hash()
|
||||||
{
|
{
|
||||||
// but different SVH
|
// but different SVH
|
||||||
@ -406,7 +411,7 @@ impl<'a> CrateLoader<'a> {
|
|||||||
None => (&source, &crate_root),
|
None => (&source, &crate_root),
|
||||||
};
|
};
|
||||||
let dlsym_dylib = dlsym_source.dylib.as_ref().expect("no dylib for a proc-macro crate");
|
let dlsym_dylib = dlsym_source.dylib.as_ref().expect("no dylib for a proc-macro crate");
|
||||||
Some(self.dlsym_proc_macros(&dlsym_dylib.0, dlsym_root.stable_crate_id())?)
|
Some(self.dlsym_proc_macros(&dlsym_dylib.0, dlsym_root.disambiguator())?)
|
||||||
} else {
|
} else {
|
||||||
None
|
None
|
||||||
};
|
};
|
||||||
@ -659,7 +664,7 @@ impl<'a> CrateLoader<'a> {
|
|||||||
fn dlsym_proc_macros(
|
fn dlsym_proc_macros(
|
||||||
&self,
|
&self,
|
||||||
path: &Path,
|
path: &Path,
|
||||||
stable_crate_id: StableCrateId,
|
disambiguator: CrateDisambiguator,
|
||||||
) -> Result<&'static [ProcMacro], CrateError> {
|
) -> Result<&'static [ProcMacro], CrateError> {
|
||||||
// Make sure the path contains a / or the linker will search for it.
|
// Make sure the path contains a / or the linker will search for it.
|
||||||
let path = env::current_dir().unwrap().join(path);
|
let path = env::current_dir().unwrap().join(path);
|
||||||
@ -668,7 +673,7 @@ impl<'a> CrateLoader<'a> {
|
|||||||
Err(s) => return Err(CrateError::DlOpen(s)),
|
Err(s) => return Err(CrateError::DlOpen(s)),
|
||||||
};
|
};
|
||||||
|
|
||||||
let sym = self.sess.generate_proc_macro_decls_symbol(stable_crate_id);
|
let sym = self.sess.generate_proc_macro_decls_symbol(disambiguator);
|
||||||
let decls = unsafe {
|
let decls = unsafe {
|
||||||
let sym = match lib.symbol(&sym) {
|
let sym = match lib.symbol(&sym) {
|
||||||
Ok(f) => f,
|
Ok(f) => f,
|
||||||
|
@ -226,7 +226,7 @@ use rustc_session::config::{self, CrateType};
|
|||||||
use rustc_session::filesearch::{FileDoesntMatch, FileMatches, FileSearch};
|
use rustc_session::filesearch::{FileDoesntMatch, FileMatches, FileSearch};
|
||||||
use rustc_session::search_paths::PathKind;
|
use rustc_session::search_paths::PathKind;
|
||||||
use rustc_session::utils::CanonicalizedPath;
|
use rustc_session::utils::CanonicalizedPath;
|
||||||
use rustc_session::{Session, StableCrateId};
|
use rustc_session::{CrateDisambiguator, Session};
|
||||||
use rustc_span::symbol::{sym, Symbol};
|
use rustc_span::symbol::{sym, Symbol};
|
||||||
use rustc_span::Span;
|
use rustc_span::Span;
|
||||||
use rustc_target::spec::{Target, TargetTriple};
|
use rustc_target::spec::{Target, TargetTriple};
|
||||||
@ -787,7 +787,7 @@ pub fn find_plugin_registrar(
|
|||||||
metadata_loader: &dyn MetadataLoader,
|
metadata_loader: &dyn MetadataLoader,
|
||||||
span: Span,
|
span: Span,
|
||||||
name: Symbol,
|
name: Symbol,
|
||||||
) -> (PathBuf, StableCrateId) {
|
) -> (PathBuf, CrateDisambiguator) {
|
||||||
match find_plugin_registrar_impl(sess, metadata_loader, name) {
|
match find_plugin_registrar_impl(sess, metadata_loader, name) {
|
||||||
Ok(res) => res,
|
Ok(res) => res,
|
||||||
// `core` is always available if we got as far as loading plugins.
|
// `core` is always available if we got as far as loading plugins.
|
||||||
@ -799,7 +799,7 @@ fn find_plugin_registrar_impl<'a>(
|
|||||||
sess: &'a Session,
|
sess: &'a Session,
|
||||||
metadata_loader: &dyn MetadataLoader,
|
metadata_loader: &dyn MetadataLoader,
|
||||||
name: Symbol,
|
name: Symbol,
|
||||||
) -> Result<(PathBuf, StableCrateId), CrateError> {
|
) -> Result<(PathBuf, CrateDisambiguator), CrateError> {
|
||||||
info!("find plugin registrar `{}`", name);
|
info!("find plugin registrar `{}`", name);
|
||||||
let mut locator = CrateLocator::new(
|
let mut locator = CrateLocator::new(
|
||||||
sess,
|
sess,
|
||||||
@ -816,7 +816,7 @@ fn find_plugin_registrar_impl<'a>(
|
|||||||
|
|
||||||
match locator.maybe_load_library_crate()? {
|
match locator.maybe_load_library_crate()? {
|
||||||
Some(library) => match library.source.dylib {
|
Some(library) => match library.source.dylib {
|
||||||
Some(dylib) => Ok((dylib.0, library.metadata.get_root().stable_crate_id())),
|
Some(dylib) => Ok((dylib.0, library.metadata.get_root().disambiguator())),
|
||||||
None => Err(CrateError::NonDylibPlugin(name)),
|
None => Err(CrateError::NonDylibPlugin(name)),
|
||||||
},
|
},
|
||||||
None => Err(locator.into_error()),
|
None => Err(locator.into_error()),
|
||||||
|
@ -620,6 +620,10 @@ impl CrateRoot<'_> {
|
|||||||
self.name
|
self.name
|
||||||
}
|
}
|
||||||
|
|
||||||
|
crate fn disambiguator(&self) -> CrateDisambiguator {
|
||||||
|
self.disambiguator
|
||||||
|
}
|
||||||
|
|
||||||
crate fn hash(&self) -> Svh {
|
crate fn hash(&self) -> Svh {
|
||||||
self.hash
|
self.hash
|
||||||
}
|
}
|
||||||
@ -1923,8 +1927,8 @@ impl CrateMetadata {
|
|||||||
self.root.name
|
self.root.name
|
||||||
}
|
}
|
||||||
|
|
||||||
crate fn stable_crate_id(&self) -> StableCrateId {
|
crate fn disambiguator(&self) -> CrateDisambiguator {
|
||||||
self.root.stable_crate_id
|
self.root.disambiguator
|
||||||
}
|
}
|
||||||
|
|
||||||
crate fn hash(&self) -> Svh {
|
crate fn hash(&self) -> Svh {
|
||||||
|
@ -19,7 +19,7 @@ use rustc_middle::middle::stability::DeprecationEntry;
|
|||||||
use rustc_middle::ty::query::Providers;
|
use rustc_middle::ty::query::Providers;
|
||||||
use rustc_middle::ty::{self, TyCtxt, Visibility};
|
use rustc_middle::ty::{self, TyCtxt, Visibility};
|
||||||
use rustc_session::utils::NativeLibKind;
|
use rustc_session::utils::NativeLibKind;
|
||||||
use rustc_session::{Session, StableCrateId};
|
use rustc_session::{CrateDisambiguator, Session};
|
||||||
use rustc_span::source_map::{Span, Spanned};
|
use rustc_span::source_map::{Span, Spanned};
|
||||||
use rustc_span::symbol::Symbol;
|
use rustc_span::symbol::Symbol;
|
||||||
|
|
||||||
@ -186,6 +186,7 @@ provide! { <'tcx> tcx, def_id, other, cdata,
|
|||||||
}
|
}
|
||||||
native_libraries => { Lrc::new(cdata.get_native_libraries(tcx.sess)) }
|
native_libraries => { Lrc::new(cdata.get_native_libraries(tcx.sess)) }
|
||||||
foreign_modules => { cdata.get_foreign_modules(tcx) }
|
foreign_modules => { cdata.get_foreign_modules(tcx) }
|
||||||
|
crate_disambiguator => { cdata.root.disambiguator }
|
||||||
crate_hash => { cdata.root.hash }
|
crate_hash => { cdata.root.hash }
|
||||||
crate_host_hash => { cdata.host_hash }
|
crate_host_hash => { cdata.host_hash }
|
||||||
crate_name => { cdata.root.name }
|
crate_name => { cdata.root.name }
|
||||||
@ -488,8 +489,8 @@ impl CrateStore for CStore {
|
|||||||
self.get_crate_data(cnum).root.name
|
self.get_crate_data(cnum).root.name
|
||||||
}
|
}
|
||||||
|
|
||||||
fn stable_crate_id_untracked(&self, cnum: CrateNum) -> StableCrateId {
|
fn crate_disambiguator_untracked(&self, cnum: CrateNum) -> CrateDisambiguator {
|
||||||
self.get_crate_data(cnum).root.stable_crate_id
|
self.get_crate_data(cnum).root.disambiguator
|
||||||
}
|
}
|
||||||
|
|
||||||
fn crate_hash_untracked(&self, cnum: CrateNum) -> Svh {
|
fn crate_hash_untracked(&self, cnum: CrateNum) -> Svh {
|
||||||
|
@ -671,6 +671,7 @@ impl<'a, 'tcx> EncodeContext<'a, 'tcx> {
|
|||||||
extra_filename: tcx.sess.opts.cg.extra_filename.clone(),
|
extra_filename: tcx.sess.opts.cg.extra_filename.clone(),
|
||||||
triple: tcx.sess.opts.target_triple.clone(),
|
triple: tcx.sess.opts.target_triple.clone(),
|
||||||
hash: tcx.crate_hash(LOCAL_CRATE),
|
hash: tcx.crate_hash(LOCAL_CRATE),
|
||||||
|
disambiguator: tcx.sess.local_crate_disambiguator(),
|
||||||
stable_crate_id: tcx.def_path_hash(LOCAL_CRATE.as_def_id()).stable_crate_id(),
|
stable_crate_id: tcx.def_path_hash(LOCAL_CRATE.as_def_id()).stable_crate_id(),
|
||||||
panic_strategy: tcx.sess.panic_strategy(),
|
panic_strategy: tcx.sess.panic_strategy(),
|
||||||
edition: tcx.sess.edition(),
|
edition: tcx.sess.edition(),
|
||||||
|
@ -18,6 +18,7 @@ use rustc_middle::mir;
|
|||||||
use rustc_middle::ty::{self, ReprOptions, Ty};
|
use rustc_middle::ty::{self, ReprOptions, Ty};
|
||||||
use rustc_serialize::opaque::Encoder;
|
use rustc_serialize::opaque::Encoder;
|
||||||
use rustc_session::config::SymbolManglingVersion;
|
use rustc_session::config::SymbolManglingVersion;
|
||||||
|
use rustc_session::CrateDisambiguator;
|
||||||
use rustc_span::edition::Edition;
|
use rustc_span::edition::Edition;
|
||||||
use rustc_span::hygiene::MacroKind;
|
use rustc_span::hygiene::MacroKind;
|
||||||
use rustc_span::symbol::{Ident, Symbol};
|
use rustc_span::symbol::{Ident, Symbol};
|
||||||
@ -201,6 +202,7 @@ crate struct CrateRoot<'tcx> {
|
|||||||
triple: TargetTriple,
|
triple: TargetTriple,
|
||||||
extra_filename: String,
|
extra_filename: String,
|
||||||
hash: Svh,
|
hash: Svh,
|
||||||
|
disambiguator: CrateDisambiguator,
|
||||||
stable_crate_id: StableCrateId,
|
stable_crate_id: StableCrateId,
|
||||||
panic_strategy: PanicStrategy,
|
panic_strategy: PanicStrategy,
|
||||||
edition: Edition,
|
edition: Edition,
|
||||||
|
@ -285,7 +285,7 @@ pub type DepNode = rustc_query_system::dep_graph::DepNode<DepKind>;
|
|||||||
// required that their size stay the same, but we don't want to change
|
// required that their size stay the same, but we don't want to change
|
||||||
// it inadvertently. This assert just ensures we're aware of any change.
|
// it inadvertently. This assert just ensures we're aware of any change.
|
||||||
#[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
|
#[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
|
||||||
static_assert_size!(DepNode, 17);
|
static_assert_size!(DepNode, 18);
|
||||||
|
|
||||||
#[cfg(not(any(target_arch = "x86", target_arch = "x86_64")))]
|
#[cfg(not(any(target_arch = "x86", target_arch = "x86_64")))]
|
||||||
static_assert_size!(DepNode, 24);
|
static_assert_size!(DepNode, 24);
|
||||||
|
@ -15,7 +15,6 @@ use rustc_hir::intravisit::Visitor;
|
|||||||
use rustc_hir::itemlikevisit::ItemLikeVisitor;
|
use rustc_hir::itemlikevisit::ItemLikeVisitor;
|
||||||
use rustc_hir::*;
|
use rustc_hir::*;
|
||||||
use rustc_index::vec::Idx;
|
use rustc_index::vec::Idx;
|
||||||
use rustc_span::def_id::StableCrateId;
|
|
||||||
use rustc_span::hygiene::MacroKind;
|
use rustc_span::hygiene::MacroKind;
|
||||||
use rustc_span::source_map::Spanned;
|
use rustc_span::source_map::Spanned;
|
||||||
use rustc_span::symbol::{kw, Ident, Symbol};
|
use rustc_span::symbol::{kw, Ident, Symbol};
|
||||||
@ -991,24 +990,25 @@ pub(super) fn crate_hash(tcx: TyCtxt<'_>, crate_num: CrateNum) -> Svh {
|
|||||||
upstream_crates.hash_stable(&mut hcx, &mut stable_hasher);
|
upstream_crates.hash_stable(&mut hcx, &mut stable_hasher);
|
||||||
source_file_names.hash_stable(&mut hcx, &mut stable_hasher);
|
source_file_names.hash_stable(&mut hcx, &mut stable_hasher);
|
||||||
tcx.sess.opts.dep_tracking_hash(true).hash_stable(&mut hcx, &mut stable_hasher);
|
tcx.sess.opts.dep_tracking_hash(true).hash_stable(&mut hcx, &mut stable_hasher);
|
||||||
tcx.sess.local_stable_crate_id().hash_stable(&mut hcx, &mut stable_hasher);
|
tcx.sess.local_crate_disambiguator().to_fingerprint().hash_stable(&mut hcx, &mut stable_hasher);
|
||||||
tcx.untracked_crate.non_exported_macro_attrs.hash_stable(&mut hcx, &mut stable_hasher);
|
tcx.untracked_crate.non_exported_macro_attrs.hash_stable(&mut hcx, &mut stable_hasher);
|
||||||
|
|
||||||
let crate_hash: Fingerprint = stable_hasher.finish();
|
let crate_hash: Fingerprint = stable_hasher.finish();
|
||||||
Svh::new(crate_hash.to_smaller_hash())
|
Svh::new(crate_hash.to_smaller_hash())
|
||||||
}
|
}
|
||||||
|
|
||||||
fn upstream_crates(cstore: &dyn CrateStore) -> Vec<(StableCrateId, Svh)> {
|
fn upstream_crates(cstore: &dyn CrateStore) -> Vec<(Symbol, Fingerprint, Svh)> {
|
||||||
let mut upstream_crates: Vec<_> = cstore
|
let mut upstream_crates: Vec<_> = cstore
|
||||||
.crates_untracked()
|
.crates_untracked()
|
||||||
.iter()
|
.iter()
|
||||||
.map(|&cnum| {
|
.map(|&cnum| {
|
||||||
let stable_crate_id = cstore.stable_crate_id_untracked(cnum);
|
let name = cstore.crate_name_untracked(cnum);
|
||||||
|
let disambiguator = cstore.crate_disambiguator_untracked(cnum).to_fingerprint();
|
||||||
let hash = cstore.crate_hash_untracked(cnum);
|
let hash = cstore.crate_hash_untracked(cnum);
|
||||||
(stable_crate_id, hash)
|
(name, disambiguator, hash)
|
||||||
})
|
})
|
||||||
.collect();
|
.collect();
|
||||||
upstream_crates.sort_unstable_by_key(|&(stable_crate_id, _)| stable_crate_id);
|
upstream_crates.sort_unstable_by_key(|&(name, dis, _)| (name.as_str(), dis));
|
||||||
upstream_crates
|
upstream_crates
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@ use rustc_hir::definitions::{DefKey, DefPath, DefPathHash};
|
|||||||
use rustc_macros::HashStable;
|
use rustc_macros::HashStable;
|
||||||
use rustc_session::search_paths::PathKind;
|
use rustc_session::search_paths::PathKind;
|
||||||
use rustc_session::utils::NativeLibKind;
|
use rustc_session::utils::NativeLibKind;
|
||||||
use rustc_session::StableCrateId;
|
use rustc_session::CrateDisambiguator;
|
||||||
use rustc_span::symbol::Symbol;
|
use rustc_span::symbol::Symbol;
|
||||||
use rustc_span::Span;
|
use rustc_span::Span;
|
||||||
use rustc_target::spec::Target;
|
use rustc_target::spec::Target;
|
||||||
@ -206,7 +206,7 @@ pub trait CrateStore {
|
|||||||
|
|
||||||
// "queries" used in resolve that aren't tracked for incremental compilation
|
// "queries" used in resolve that aren't tracked for incremental compilation
|
||||||
fn crate_name_untracked(&self, cnum: CrateNum) -> Symbol;
|
fn crate_name_untracked(&self, cnum: CrateNum) -> Symbol;
|
||||||
fn stable_crate_id_untracked(&self, cnum: CrateNum) -> StableCrateId;
|
fn crate_disambiguator_untracked(&self, cnum: CrateNum) -> CrateDisambiguator;
|
||||||
fn crate_hash_untracked(&self, cnum: CrateNum) -> Svh;
|
fn crate_hash_untracked(&self, cnum: CrateNum) -> Svh;
|
||||||
|
|
||||||
// This is basically a 1-based range of ints, which is a little
|
// This is basically a 1-based range of ints, which is a little
|
||||||
|
@ -48,8 +48,8 @@ impl<'tcx> ExportedSymbol<'tcx> {
|
|||||||
|
|
||||||
pub fn metadata_symbol_name(tcx: TyCtxt<'_>) -> String {
|
pub fn metadata_symbol_name(tcx: TyCtxt<'_>) -> String {
|
||||||
format!(
|
format!(
|
||||||
"rust_metadata_{}_{:08x}",
|
"rust_metadata_{}_{}",
|
||||||
tcx.crate_name(LOCAL_CRATE),
|
tcx.crate_name(LOCAL_CRATE),
|
||||||
tcx.sess.local_stable_crate_id().to_u64(),
|
tcx.crate_disambiguator(LOCAL_CRATE).to_fingerprint().to_hex()
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -490,18 +490,15 @@ impl CodegenUnitNameBuilder<'tcx> {
|
|||||||
// local crate's ID. Otherwise there can be collisions between CGUs
|
// local crate's ID. Otherwise there can be collisions between CGUs
|
||||||
// instantiating stuff for upstream crates.
|
// instantiating stuff for upstream crates.
|
||||||
let local_crate_id = if cnum != LOCAL_CRATE {
|
let local_crate_id = if cnum != LOCAL_CRATE {
|
||||||
let local_stable_crate_id = tcx.sess.local_stable_crate_id();
|
let local_crate_disambiguator = format!("{}", tcx.crate_disambiguator(LOCAL_CRATE));
|
||||||
format!(
|
format!("-in-{}.{}", tcx.crate_name(LOCAL_CRATE), &local_crate_disambiguator[0..8])
|
||||||
"-in-{}.{:08x}",
|
|
||||||
tcx.crate_name(LOCAL_CRATE),
|
|
||||||
local_stable_crate_id.to_u64()
|
|
||||||
)
|
|
||||||
} else {
|
} else {
|
||||||
String::new()
|
String::new()
|
||||||
};
|
};
|
||||||
|
|
||||||
let stable_crate_id = tcx.sess.local_stable_crate_id();
|
let crate_disambiguator = tcx.crate_disambiguator(cnum).to_string();
|
||||||
format!("{}.{:08x}{}", tcx.crate_name(cnum), stable_crate_id.to_u64(), local_crate_id)
|
// Using a shortened disambiguator of about 40 bits
|
||||||
|
format!("{}.{}{}", tcx.crate_name(cnum), &crate_disambiguator[0..8], local_crate_id)
|
||||||
});
|
});
|
||||||
|
|
||||||
write!(cgu_name, "{}", crate_prefix).unwrap();
|
write!(cgu_name, "{}", crate_prefix).unwrap();
|
||||||
|
@ -1237,6 +1237,10 @@ rustc_queries! {
|
|||||||
query proc_macro_decls_static(_: ()) -> Option<LocalDefId> {
|
query proc_macro_decls_static(_: ()) -> Option<LocalDefId> {
|
||||||
desc { "looking up the derive registrar for a crate" }
|
desc { "looking up the derive registrar for a crate" }
|
||||||
}
|
}
|
||||||
|
query crate_disambiguator(_: CrateNum) -> CrateDisambiguator {
|
||||||
|
eval_always
|
||||||
|
desc { "looking up the disambiguator a crate" }
|
||||||
|
}
|
||||||
// The macro which defines `rustc_metadata::provide_extern` depends on this query's name.
|
// The macro which defines `rustc_metadata::provide_extern` depends on this query's name.
|
||||||
// Changing the name should cause a compiler error, but in case that changes, be aware.
|
// Changing the name should cause a compiler error, but in case that changes, be aware.
|
||||||
query crate_hash(_: CrateNum) -> Svh {
|
query crate_hash(_: CrateNum) -> Svh {
|
||||||
|
@ -1275,24 +1275,24 @@ impl<'tcx> TyCtxt<'tcx> {
|
|||||||
|
|
||||||
pub fn def_path_debug_str(self, def_id: DefId) -> String {
|
pub fn def_path_debug_str(self, def_id: DefId) -> String {
|
||||||
// We are explicitly not going through queries here in order to get
|
// We are explicitly not going through queries here in order to get
|
||||||
// crate name and stable crate id since this code is called from debug!()
|
// crate name and disambiguator since this code is called from debug!()
|
||||||
// statements within the query system and we'd run into endless
|
// statements within the query system and we'd run into endless
|
||||||
// recursion otherwise.
|
// recursion otherwise.
|
||||||
let (crate_name, stable_crate_id) = if def_id.is_local() {
|
let (crate_name, crate_disambiguator) = if def_id.is_local() {
|
||||||
(self.crate_name, self.sess.local_stable_crate_id())
|
(self.crate_name, self.sess.local_crate_disambiguator())
|
||||||
} else {
|
} else {
|
||||||
(
|
(
|
||||||
self.cstore.crate_name_untracked(def_id.krate),
|
self.cstore.crate_name_untracked(def_id.krate),
|
||||||
self.def_path_hash(def_id.krate.as_def_id()).stable_crate_id(),
|
self.cstore.crate_disambiguator_untracked(def_id.krate),
|
||||||
)
|
)
|
||||||
};
|
};
|
||||||
|
|
||||||
format!(
|
format!(
|
||||||
"{}[{}]{}",
|
"{}[{}]{}",
|
||||||
crate_name,
|
crate_name,
|
||||||
// Don't print the whole stable crate id. That's just
|
// Don't print the whole crate disambiguator. That's just
|
||||||
// annoying in debug output.
|
// annoying in debug output.
|
||||||
&(format!("{:08x}", stable_crate_id.to_u64()))[..4],
|
&(crate_disambiguator.to_fingerprint().to_hex())[..4],
|
||||||
self.def_path(def_id).to_string_no_crate_verbose()
|
self.def_path(def_id).to_string_no_crate_verbose()
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -47,6 +47,7 @@ use rustc_index::{bit_set::FiniteBitSet, vec::IndexVec};
|
|||||||
use rustc_serialize::opaque;
|
use rustc_serialize::opaque;
|
||||||
use rustc_session::config::{EntryFnType, OptLevel, OutputFilenames, SymbolManglingVersion};
|
use rustc_session::config::{EntryFnType, OptLevel, OutputFilenames, SymbolManglingVersion};
|
||||||
use rustc_session::utils::NativeLibKind;
|
use rustc_session::utils::NativeLibKind;
|
||||||
|
use rustc_session::CrateDisambiguator;
|
||||||
use rustc_target::spec::PanicStrategy;
|
use rustc_target::spec::PanicStrategy;
|
||||||
|
|
||||||
use rustc_ast as ast;
|
use rustc_ast as ast;
|
||||||
|
@ -18,7 +18,7 @@ use rustc_serialize::{
|
|||||||
opaque::{self, FileEncodeResult, FileEncoder, IntEncodedWithFixedSize},
|
opaque::{self, FileEncodeResult, FileEncoder, IntEncodedWithFixedSize},
|
||||||
Decodable, Decoder, Encodable, Encoder,
|
Decodable, Decoder, Encodable, Encoder,
|
||||||
};
|
};
|
||||||
use rustc_session::{Session, StableCrateId};
|
use rustc_session::{CrateDisambiguator, Session};
|
||||||
use rustc_span::hygiene::{
|
use rustc_span::hygiene::{
|
||||||
ExpnDataDecodeMode, ExpnDataEncodeMode, ExpnId, HygieneDecodeContext, HygieneEncodeContext,
|
ExpnDataDecodeMode, ExpnDataEncodeMode, ExpnId, HygieneDecodeContext, HygieneEncodeContext,
|
||||||
SyntaxContext, SyntaxContextData,
|
SyntaxContext, SyntaxContextData,
|
||||||
@ -52,7 +52,7 @@ pub struct OnDiskCache<'sess> {
|
|||||||
// session.
|
// session.
|
||||||
current_diagnostics: Lock<FxHashMap<DepNodeIndex, Vec<Diagnostic>>>,
|
current_diagnostics: Lock<FxHashMap<DepNodeIndex, Vec<Diagnostic>>>,
|
||||||
|
|
||||||
prev_cnums: Vec<(u32, StableCrateId)>,
|
prev_cnums: Vec<(u32, String, CrateDisambiguator)>,
|
||||||
cnum_map: OnceCell<IndexVec<CrateNum, Option<CrateNum>>>,
|
cnum_map: OnceCell<IndexVec<CrateNum, Option<CrateNum>>>,
|
||||||
|
|
||||||
source_map: &'sess SourceMap,
|
source_map: &'sess SourceMap,
|
||||||
@ -120,7 +120,7 @@ pub struct OnDiskCache<'sess> {
|
|||||||
#[derive(Encodable, Decodable)]
|
#[derive(Encodable, Decodable)]
|
||||||
struct Footer {
|
struct Footer {
|
||||||
file_index_to_stable_id: FxHashMap<SourceFileIndex, StableSourceFileId>,
|
file_index_to_stable_id: FxHashMap<SourceFileIndex, StableSourceFileId>,
|
||||||
prev_cnums: Vec<(u32, StableCrateId)>,
|
prev_cnums: Vec<(u32, String, CrateDisambiguator)>,
|
||||||
query_result_index: EncodedQueryResultIndex,
|
query_result_index: EncodedQueryResultIndex,
|
||||||
diagnostics_index: EncodedQueryResultIndex,
|
diagnostics_index: EncodedQueryResultIndex,
|
||||||
// The location of all allocations.
|
// The location of all allocations.
|
||||||
@ -349,8 +349,9 @@ impl<'sess> OnDiskCache<'sess> {
|
|||||||
let prev_cnums: Vec<_> = sorted_cnums
|
let prev_cnums: Vec<_> = sorted_cnums
|
||||||
.iter()
|
.iter()
|
||||||
.map(|&cnum| {
|
.map(|&cnum| {
|
||||||
let stable_crate_id = tcx.def_path_hash(cnum.as_def_id()).stable_crate_id();
|
let crate_name = tcx.crate_name(cnum).to_string();
|
||||||
(cnum.as_u32(), stable_crate_id)
|
let crate_disambiguator = tcx.crate_disambiguator(cnum);
|
||||||
|
(cnum.as_u32(), crate_name, crate_disambiguator)
|
||||||
})
|
})
|
||||||
.collect();
|
.collect();
|
||||||
|
|
||||||
@ -574,23 +575,25 @@ impl<'sess> OnDiskCache<'sess> {
|
|||||||
// maps to None.
|
// maps to None.
|
||||||
fn compute_cnum_map(
|
fn compute_cnum_map(
|
||||||
tcx: TyCtxt<'_>,
|
tcx: TyCtxt<'_>,
|
||||||
prev_cnums: &[(u32, StableCrateId)],
|
prev_cnums: &[(u32, String, CrateDisambiguator)],
|
||||||
) -> IndexVec<CrateNum, Option<CrateNum>> {
|
) -> IndexVec<CrateNum, Option<CrateNum>> {
|
||||||
tcx.dep_graph.with_ignore(|| {
|
tcx.dep_graph.with_ignore(|| {
|
||||||
let current_cnums = tcx
|
let current_cnums = tcx
|
||||||
.all_crate_nums(())
|
.all_crate_nums(())
|
||||||
.iter()
|
.iter()
|
||||||
.map(|&cnum| {
|
.map(|&cnum| {
|
||||||
let stable_crate_id = tcx.def_path_hash(cnum.as_def_id()).stable_crate_id();
|
let crate_name = tcx.crate_name(cnum).to_string();
|
||||||
(stable_crate_id, cnum)
|
let crate_disambiguator = tcx.crate_disambiguator(cnum);
|
||||||
|
((crate_name, crate_disambiguator), cnum)
|
||||||
})
|
})
|
||||||
.collect::<FxHashMap<_, _>>();
|
.collect::<FxHashMap<_, _>>();
|
||||||
|
|
||||||
let map_size = prev_cnums.iter().map(|&(cnum, ..)| cnum).max().unwrap_or(0) + 1;
|
let map_size = prev_cnums.iter().map(|&(cnum, ..)| cnum).max().unwrap_or(0) + 1;
|
||||||
let mut map = IndexVec::from_elem_n(None, map_size as usize);
|
let mut map = IndexVec::from_elem_n(None, map_size as usize);
|
||||||
|
|
||||||
for &(prev_cnum, stable_crate_id) in prev_cnums {
|
for &(prev_cnum, ref crate_name, crate_disambiguator) in prev_cnums {
|
||||||
map[CrateNum::from_u32(prev_cnum)] = current_cnums.get(&stable_crate_id).cloned();
|
let key = (crate_name.clone(), crate_disambiguator);
|
||||||
|
map[CrateNum::from_u32(prev_cnum)] = current_cnums.get(&key).cloned();
|
||||||
}
|
}
|
||||||
|
|
||||||
map[LOCAL_CRATE] = Some(LOCAL_CRATE);
|
map[LOCAL_CRATE] = Some(LOCAL_CRATE);
|
||||||
|
@ -1222,7 +1222,7 @@ impl<'a> Resolver<'a> {
|
|||||||
let mut module_map = FxHashMap::default();
|
let mut module_map = FxHashMap::default();
|
||||||
module_map.insert(root_local_def_id, graph_root);
|
module_map.insert(root_local_def_id, graph_root);
|
||||||
|
|
||||||
let definitions = Definitions::new(session.local_stable_crate_id());
|
let definitions = Definitions::new(crate_name, session.local_crate_disambiguator());
|
||||||
let root = definitions.get_root_def();
|
let root = definitions.get_root_def();
|
||||||
|
|
||||||
let mut visibilities = FxHashMap::default();
|
let mut visibilities = FxHashMap::default();
|
||||||
|
@ -142,7 +142,12 @@ impl<'tcx> DumpVisitor<'tcx> {
|
|||||||
let data = CratePreludeData {
|
let data = CratePreludeData {
|
||||||
crate_id: GlobalCrateId {
|
crate_id: GlobalCrateId {
|
||||||
name: name.into(),
|
name: name.into(),
|
||||||
disambiguator: (self.tcx.sess.local_stable_crate_id().to_u64(), 0),
|
disambiguator: self
|
||||||
|
.tcx
|
||||||
|
.sess
|
||||||
|
.local_crate_disambiguator()
|
||||||
|
.to_fingerprint()
|
||||||
|
.as_value(),
|
||||||
},
|
},
|
||||||
crate_root: crate_root.unwrap_or_else(|| "<no source>".to_owned()),
|
crate_root: crate_root.unwrap_or_else(|| "<no source>".to_owned()),
|
||||||
external_crates: self.save_ctxt.get_external_crates(),
|
external_crates: self.save_ctxt.get_external_crates(),
|
||||||
|
@ -127,10 +127,7 @@ impl<'tcx> SaveContext<'tcx> {
|
|||||||
num: n.as_u32(),
|
num: n.as_u32(),
|
||||||
id: GlobalCrateId {
|
id: GlobalCrateId {
|
||||||
name: self.tcx.crate_name(n).to_string(),
|
name: self.tcx.crate_name(n).to_string(),
|
||||||
disambiguator: (
|
disambiguator: self.tcx.crate_disambiguator(n).to_fingerprint().as_value(),
|
||||||
self.tcx.def_path_hash(n.as_def_id()).stable_crate_id().to_u64(),
|
|
||||||
0,
|
|
||||||
),
|
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -22,7 +22,7 @@ use rustc_errors::json::JsonEmitter;
|
|||||||
use rustc_errors::registry::Registry;
|
use rustc_errors::registry::Registry;
|
||||||
use rustc_errors::{Diagnostic, DiagnosticBuilder, DiagnosticId, ErrorReported};
|
use rustc_errors::{Diagnostic, DiagnosticBuilder, DiagnosticId, ErrorReported};
|
||||||
use rustc_lint_defs::FutureBreakage;
|
use rustc_lint_defs::FutureBreakage;
|
||||||
pub use rustc_span::def_id::StableCrateId;
|
pub use rustc_span::crate_disambiguator::CrateDisambiguator;
|
||||||
use rustc_span::source_map::{FileLoader, MultiSpan, RealFileLoader, SourceMap, Span};
|
use rustc_span::source_map::{FileLoader, MultiSpan, RealFileLoader, SourceMap, Span};
|
||||||
use rustc_span::{edition::Edition, RealFileName};
|
use rustc_span::{edition::Edition, RealFileName};
|
||||||
use rustc_span::{sym, SourceFileHashAlgorithm, Symbol};
|
use rustc_span::{sym, SourceFileHashAlgorithm, Symbol};
|
||||||
@ -133,12 +133,12 @@ pub struct Session {
|
|||||||
/// in order to avoid redundantly verbose output (Issue #24690, #44953).
|
/// in order to avoid redundantly verbose output (Issue #24690, #44953).
|
||||||
pub one_time_diagnostics: Lock<FxHashSet<(DiagnosticMessageId, Option<Span>, String)>>,
|
pub one_time_diagnostics: Lock<FxHashSet<(DiagnosticMessageId, Option<Span>, String)>>,
|
||||||
crate_types: OnceCell<Vec<CrateType>>,
|
crate_types: OnceCell<Vec<CrateType>>,
|
||||||
/// The `stable_crate_id` is constructed out of the crate name and all the
|
/// The `crate_disambiguator` is constructed out of all the `-C metadata`
|
||||||
/// `-C metadata` arguments passed to the compiler. Its value forms a unique
|
/// arguments passed to the compiler. Its value together with the crate-name
|
||||||
/// global identifier for the crate. It is used to allow multiple crates
|
/// forms a unique global identifier for the crate. It is used to allow
|
||||||
/// with the same name to coexist. See the
|
/// multiple crates with the same name to coexist. See the
|
||||||
/// `rustc_codegen_llvm::back::symbol_names` module for more information.
|
/// `rustc_codegen_llvm::back::symbol_names` module for more information.
|
||||||
pub stable_crate_id: OnceCell<StableCrateId>,
|
pub crate_disambiguator: OnceCell<CrateDisambiguator>,
|
||||||
|
|
||||||
features: OnceCell<rustc_feature::Features>,
|
features: OnceCell<rustc_feature::Features>,
|
||||||
|
|
||||||
@ -335,8 +335,8 @@ impl Session {
|
|||||||
self.parse_sess.span_diagnostic.emit_future_breakage_report(diags_and_breakage);
|
self.parse_sess.span_diagnostic.emit_future_breakage_report(diags_and_breakage);
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn local_stable_crate_id(&self) -> StableCrateId {
|
pub fn local_crate_disambiguator(&self) -> CrateDisambiguator {
|
||||||
self.stable_crate_id.get().copied().unwrap()
|
self.crate_disambiguator.get().copied().unwrap()
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn crate_types(&self) -> &[CrateType] {
|
pub fn crate_types(&self) -> &[CrateType] {
|
||||||
@ -833,12 +833,12 @@ impl Session {
|
|||||||
|
|
||||||
/// Returns the symbol name for the registrar function,
|
/// Returns the symbol name for the registrar function,
|
||||||
/// given the crate `Svh` and the function `DefIndex`.
|
/// given the crate `Svh` and the function `DefIndex`.
|
||||||
pub fn generate_plugin_registrar_symbol(&self, stable_crate_id: StableCrateId) -> String {
|
pub fn generate_plugin_registrar_symbol(&self, disambiguator: CrateDisambiguator) -> String {
|
||||||
format!("__rustc_plugin_registrar_{:08x}__", stable_crate_id.to_u64())
|
format!("__rustc_plugin_registrar_{}__", disambiguator.to_fingerprint().to_hex())
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn generate_proc_macro_decls_symbol(&self, stable_crate_id: StableCrateId) -> String {
|
pub fn generate_proc_macro_decls_symbol(&self, disambiguator: CrateDisambiguator) -> String {
|
||||||
format!("__rustc_proc_macro_decls_{:08x}__", stable_crate_id.to_u64())
|
format!("__rustc_proc_macro_decls_{}__", disambiguator.to_fingerprint().to_hex())
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn target_filesearch(&self, kind: PathKind) -> filesearch::FileSearch<'_> {
|
pub fn target_filesearch(&self, kind: PathKind) -> filesearch::FileSearch<'_> {
|
||||||
@ -1397,7 +1397,7 @@ pub fn build_session(
|
|||||||
working_dir,
|
working_dir,
|
||||||
one_time_diagnostics: Default::default(),
|
one_time_diagnostics: Default::default(),
|
||||||
crate_types: OnceCell::new(),
|
crate_types: OnceCell::new(),
|
||||||
stable_crate_id: OnceCell::new(),
|
crate_disambiguator: OnceCell::new(),
|
||||||
features: OnceCell::new(),
|
features: OnceCell::new(),
|
||||||
lint_store: OnceCell::new(),
|
lint_store: OnceCell::new(),
|
||||||
recursion_limit: OnceCell::new(),
|
recursion_limit: OnceCell::new(),
|
||||||
|
35
compiler/rustc_span/src/crate_disambiguator.rs
Normal file
35
compiler/rustc_span/src/crate_disambiguator.rs
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
// This is here because `rustc_session` wants to refer to it,
|
||||||
|
// and so does `rustc_hir`, but `rustc_hir` shouldn't refer to `rustc_session`.
|
||||||
|
|
||||||
|
use rustc_data_structures::fingerprint::Fingerprint;
|
||||||
|
use rustc_data_structures::{base_n, impl_stable_hash_via_hash};
|
||||||
|
|
||||||
|
use std::fmt;
|
||||||
|
|
||||||
|
/// Hash value constructed out of all the `-C metadata` arguments passed to the
|
||||||
|
/// compiler. Together with the crate-name forms a unique global identifier for
|
||||||
|
/// the crate.
|
||||||
|
#[derive(Eq, PartialEq, Ord, PartialOrd, Hash, Debug, Clone, Copy, Encodable, Decodable)]
|
||||||
|
pub struct CrateDisambiguator(Fingerprint);
|
||||||
|
|
||||||
|
impl CrateDisambiguator {
|
||||||
|
pub fn to_fingerprint(self) -> Fingerprint {
|
||||||
|
self.0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl fmt::Display for CrateDisambiguator {
|
||||||
|
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> Result<(), fmt::Error> {
|
||||||
|
let (a, b) = self.0.as_value();
|
||||||
|
let as_u128 = a as u128 | ((b as u128) << 64);
|
||||||
|
f.write_str(&base_n::encode(as_u128, base_n::CASE_INSENSITIVE))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl From<Fingerprint> for CrateDisambiguator {
|
||||||
|
fn from(fingerprint: Fingerprint) -> CrateDisambiguator {
|
||||||
|
CrateDisambiguator(fingerprint)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl_stable_hash_via_hash!(CrateDisambiguator);
|
@ -1,3 +1,4 @@
|
|||||||
|
use crate::crate_disambiguator::CrateDisambiguator;
|
||||||
use crate::HashStableContext;
|
use crate::HashStableContext;
|
||||||
use rustc_data_structures::fingerprint::Fingerprint;
|
use rustc_data_structures::fingerprint::Fingerprint;
|
||||||
use rustc_data_structures::stable_hasher::{HashStable, StableHasher};
|
use rustc_data_structures::stable_hasher::{HashStable, StableHasher};
|
||||||
@ -126,51 +127,26 @@ impl Borrow<Fingerprint> for DefPathHash {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// A [StableCrateId] is a 64 bit hash of the crate name combined with all
|
/// A [StableCrateId] is a 64 bit hash of `(crate-name, crate-disambiguator)`. It
|
||||||
/// `-Cmetadata` arguments. It is to [CrateNum] what [DefPathHash] is to
|
/// is to [CrateNum] what [DefPathHash] is to [DefId]. It is stable across
|
||||||
/// [DefId]. It is stable across compilation sessions.
|
/// compilation sessions.
|
||||||
///
|
///
|
||||||
/// Since the ID is a hash value there is a (very small) chance that two crates
|
/// Since the ID is a hash value there is a (very small) chance that two crates
|
||||||
/// end up with the same [StableCrateId]. The compiler will check for such
|
/// end up with the same [StableCrateId]. The compiler will check for such
|
||||||
/// collisions when loading crates and abort compilation in order to avoid
|
/// collisions when loading crates and abort compilation in order to avoid
|
||||||
/// further trouble.
|
/// further trouble.
|
||||||
#[derive(Copy, Clone, Hash, PartialEq, Eq, PartialOrd, Ord, Debug)]
|
#[derive(Copy, Clone, Hash, PartialEq, Eq, PartialOrd, Ord, Debug, Encodable, Decodable)]
|
||||||
#[derive(HashStable_Generic, Encodable, Decodable)]
|
|
||||||
pub struct StableCrateId(u64);
|
pub struct StableCrateId(u64);
|
||||||
|
|
||||||
impl StableCrateId {
|
impl StableCrateId {
|
||||||
pub fn to_u64(self) -> u64 {
|
|
||||||
self.0
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Computes the stable ID for a crate with the given name and
|
/// Computes the stable ID for a crate with the given name and
|
||||||
/// `-Cmetadata` arguments.
|
/// disambiguator.
|
||||||
pub fn new(crate_name: &str, is_exe: bool, mut metadata: Vec<String>) -> StableCrateId {
|
pub fn new(crate_name: &str, crate_disambiguator: CrateDisambiguator) -> StableCrateId {
|
||||||
use std::hash::Hash;
|
use std::hash::Hash;
|
||||||
use std::hash::Hasher;
|
|
||||||
|
|
||||||
let mut hasher = StableHasher::new();
|
let mut hasher = StableHasher::new();
|
||||||
crate_name.hash(&mut hasher);
|
crate_name.hash(&mut hasher);
|
||||||
|
crate_disambiguator.hash(&mut hasher);
|
||||||
// We don't want the stable crate id to dependent on the order
|
|
||||||
// -C metadata arguments, so sort them:
|
|
||||||
metadata.sort();
|
|
||||||
// Every distinct -C metadata value is only incorporated once:
|
|
||||||
metadata.dedup();
|
|
||||||
|
|
||||||
hasher.write(b"metadata");
|
|
||||||
for s in &metadata {
|
|
||||||
// Also incorporate the length of a metadata string, so that we generate
|
|
||||||
// different values for `-Cmetadata=ab -Cmetadata=c` and
|
|
||||||
// `-Cmetadata=a -Cmetadata=bc`
|
|
||||||
hasher.write_usize(s.len());
|
|
||||||
hasher.write(s.as_bytes());
|
|
||||||
}
|
|
||||||
|
|
||||||
// Also incorporate crate type, so that we don't get symbol conflicts when
|
|
||||||
// linking against a library of the same name, if this is an executable.
|
|
||||||
hasher.write(if is_exe { b"exe" } else { b"lib" });
|
|
||||||
|
|
||||||
StableCrateId(hasher.finish())
|
StableCrateId(hasher.finish())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -45,6 +45,8 @@ pub mod lev_distance;
|
|||||||
mod span_encoding;
|
mod span_encoding;
|
||||||
pub use span_encoding::{Span, DUMMY_SP};
|
pub use span_encoding::{Span, DUMMY_SP};
|
||||||
|
|
||||||
|
pub mod crate_disambiguator;
|
||||||
|
|
||||||
pub mod symbol;
|
pub mod symbol;
|
||||||
pub use symbol::{sym, Symbol};
|
pub use symbol::{sym, Symbol};
|
||||||
|
|
||||||
|
@ -126,9 +126,8 @@ fn get_symbol_hash<'tcx>(
|
|||||||
substs.hash_stable(&mut hcx, &mut hasher);
|
substs.hash_stable(&mut hcx, &mut hasher);
|
||||||
|
|
||||||
if let Some(instantiating_crate) = instantiating_crate {
|
if let Some(instantiating_crate) = instantiating_crate {
|
||||||
tcx.def_path_hash(instantiating_crate.as_def_id())
|
tcx.crate_name(instantiating_crate).as_str().hash_stable(&mut hcx, &mut hasher);
|
||||||
.stable_crate_id()
|
tcx.crate_disambiguator(instantiating_crate).hash_stable(&mut hcx, &mut hasher);
|
||||||
.hash_stable(&mut hcx, &mut hasher);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// We want to avoid accidental collision between different types of instances.
|
// We want to avoid accidental collision between different types of instances.
|
||||||
|
@ -165,12 +165,12 @@ fn compute_symbol_name(
|
|||||||
// FIXME(eddyb) Precompute a custom symbol name based on attributes.
|
// FIXME(eddyb) Precompute a custom symbol name based on attributes.
|
||||||
let is_foreign = if let Some(def_id) = def_id.as_local() {
|
let is_foreign = if let Some(def_id) = def_id.as_local() {
|
||||||
if tcx.plugin_registrar_fn(()) == Some(def_id) {
|
if tcx.plugin_registrar_fn(()) == Some(def_id) {
|
||||||
let stable_crate_id = tcx.sess.local_stable_crate_id();
|
let disambiguator = tcx.sess.local_crate_disambiguator();
|
||||||
return tcx.sess.generate_plugin_registrar_symbol(stable_crate_id);
|
return tcx.sess.generate_plugin_registrar_symbol(disambiguator);
|
||||||
}
|
}
|
||||||
if tcx.proc_macro_decls_static(()) == Some(def_id) {
|
if tcx.proc_macro_decls_static(()) == Some(def_id) {
|
||||||
let stable_crate_id = tcx.sess.local_stable_crate_id();
|
let disambiguator = tcx.sess.local_crate_disambiguator();
|
||||||
return tcx.sess.generate_proc_macro_decls_symbol(stable_crate_id);
|
return tcx.sess.generate_proc_macro_decls_symbol(disambiguator);
|
||||||
}
|
}
|
||||||
let hir_id = tcx.hir().local_def_id_to_hir_id(def_id);
|
let hir_id = tcx.hir().local_def_id_to_hir_id(def_id);
|
||||||
matches!(tcx.hir().get(hir_id), Node::ForeignItem(_))
|
matches!(tcx.hir().get(hir_id), Node::ForeignItem(_))
|
||||||
|
@ -592,8 +592,8 @@ impl Printer<'tcx> for SymbolMangler<'tcx> {
|
|||||||
|
|
||||||
fn path_crate(mut self, cnum: CrateNum) -> Result<Self::Path, Self::Error> {
|
fn path_crate(mut self, cnum: CrateNum) -> Result<Self::Path, Self::Error> {
|
||||||
self.push("C");
|
self.push("C");
|
||||||
let stable_crate_id = self.tcx.def_path_hash(cnum.as_def_id()).stable_crate_id();
|
let fingerprint = self.tcx.crate_disambiguator(cnum).to_fingerprint();
|
||||||
self.push_disambiguator(stable_crate_id.to_u64());
|
self.push_disambiguator(fingerprint.to_smaller_hash());
|
||||||
let name = self.tcx.crate_name(cnum).as_str();
|
let name = self.tcx.crate_name(cnum).as_str();
|
||||||
self.push_ident(&name);
|
self.push_ident(&name);
|
||||||
Ok(self)
|
Ok(self)
|
||||||
|
@ -1,11 +1,12 @@
|
|||||||
use rustc_data_structures::fx::FxIndexSet;
|
use rustc_data_structures::fx::FxIndexSet;
|
||||||
use rustc_hir as hir;
|
use rustc_hir as hir;
|
||||||
use rustc_hir::def_id::{DefId, LocalDefId};
|
use rustc_hir::def_id::{CrateNum, DefId, LocalDefId, LOCAL_CRATE};
|
||||||
use rustc_middle::hir::map as hir_map;
|
use rustc_middle::hir::map as hir_map;
|
||||||
use rustc_middle::ty::subst::Subst;
|
use rustc_middle::ty::subst::Subst;
|
||||||
use rustc_middle::ty::{
|
use rustc_middle::ty::{
|
||||||
self, Binder, Predicate, PredicateKind, ToPredicate, Ty, TyCtxt, WithConstness,
|
self, Binder, Predicate, PredicateKind, ToPredicate, Ty, TyCtxt, WithConstness,
|
||||||
};
|
};
|
||||||
|
use rustc_session::CrateDisambiguator;
|
||||||
use rustc_span::Span;
|
use rustc_span::Span;
|
||||||
use rustc_trait_selection::traits;
|
use rustc_trait_selection::traits;
|
||||||
|
|
||||||
@ -387,6 +388,11 @@ fn param_env_reveal_all_normalized(tcx: TyCtxt<'_>, def_id: DefId) -> ty::ParamE
|
|||||||
tcx.param_env(def_id).with_reveal_all_normalized(tcx)
|
tcx.param_env(def_id).with_reveal_all_normalized(tcx)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn crate_disambiguator(tcx: TyCtxt<'_>, crate_num: CrateNum) -> CrateDisambiguator {
|
||||||
|
assert_eq!(crate_num, LOCAL_CRATE);
|
||||||
|
tcx.sess.local_crate_disambiguator()
|
||||||
|
}
|
||||||
|
|
||||||
fn instance_def_size_estimate<'tcx>(
|
fn instance_def_size_estimate<'tcx>(
|
||||||
tcx: TyCtxt<'tcx>,
|
tcx: TyCtxt<'tcx>,
|
||||||
instance_def: ty::InstanceDef<'tcx>,
|
instance_def: ty::InstanceDef<'tcx>,
|
||||||
@ -532,6 +538,7 @@ pub fn provide(providers: &mut ty::query::Providers) {
|
|||||||
param_env,
|
param_env,
|
||||||
param_env_reveal_all_normalized,
|
param_env_reveal_all_normalized,
|
||||||
trait_of_item,
|
trait_of_item,
|
||||||
|
crate_disambiguator,
|
||||||
instance_def_size_estimate,
|
instance_def_size_estimate,
|
||||||
issue33140_self_ty,
|
issue33140_self_ty,
|
||||||
impl_defaultness,
|
impl_defaultness,
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
- _3 = [move _4]; // scope 0 at $DIR/const-promotion-extern-static.rs:9:31: 9:35
|
- _3 = [move _4]; // scope 0 at $DIR/const-promotion-extern-static.rs:9:31: 9:35
|
||||||
- _2 = &_3; // scope 0 at $DIR/const-promotion-extern-static.rs:9:31: 9:35
|
- _2 = &_3; // scope 0 at $DIR/const-promotion-extern-static.rs:9:31: 9:35
|
||||||
+ // + span: $DIR/const-promotion-extern-static.rs:9:31: 9:35
|
+ // + span: $DIR/const-promotion-extern-static.rs:9:31: 9:35
|
||||||
+ // + literal: Const { ty: &[&i32; 1], val: Unevaluated(Unevaluated { def: WithOptConstParam { did: DefId(0:6 ~ const_promotion_extern_static[55e6]::BAR), const_param_did: None }, substs: [], promoted: Some(promoted[0]) }) }
|
+ // + literal: Const { ty: &[&i32; 1], val: Unevaluated(Unevaluated { def: WithOptConstParam { did: DefId(0:6 ~ const_promotion_extern_static[317d]::BAR), const_param_did: None }, substs: [], promoted: Some(promoted[0]) }) }
|
||||||
+ _2 = &(*_6); // scope 0 at $DIR/const-promotion-extern-static.rs:9:31: 9:35
|
+ _2 = &(*_6); // scope 0 at $DIR/const-promotion-extern-static.rs:9:31: 9:35
|
||||||
_1 = move _2 as &[&i32] (Pointer(Unsize)); // scope 0 at $DIR/const-promotion-extern-static.rs:9:31: 9:35
|
_1 = move _2 as &[&i32] (Pointer(Unsize)); // scope 0 at $DIR/const-promotion-extern-static.rs:9:31: 9:35
|
||||||
- StorageDead(_4); // scope 0 at $DIR/const-promotion-extern-static.rs:9:34: 9:35
|
- StorageDead(_4); // scope 0 at $DIR/const-promotion-extern-static.rs:9:34: 9:35
|
||||||
|
@ -32,7 +32,7 @@
|
|||||||
- _3 = [move _4]; // scope 0 at $DIR/const-promotion-extern-static.rs:13:31: 13:46
|
- _3 = [move _4]; // scope 0 at $DIR/const-promotion-extern-static.rs:13:31: 13:46
|
||||||
- _2 = &_3; // scope 0 at $DIR/const-promotion-extern-static.rs:13:31: 13:46
|
- _2 = &_3; // scope 0 at $DIR/const-promotion-extern-static.rs:13:31: 13:46
|
||||||
+ // + span: $DIR/const-promotion-extern-static.rs:13:31: 13:46
|
+ // + span: $DIR/const-promotion-extern-static.rs:13:31: 13:46
|
||||||
+ // + literal: Const { ty: &[&i32; 1], val: Unevaluated(Unevaluated { def: WithOptConstParam { did: DefId(0:7 ~ const_promotion_extern_static[55e6]::FOO), const_param_did: None }, substs: [], promoted: Some(promoted[0]) }) }
|
+ // + literal: Const { ty: &[&i32; 1], val: Unevaluated(Unevaluated { def: WithOptConstParam { did: DefId(0:7 ~ const_promotion_extern_static[317d]::FOO), const_param_did: None }, substs: [], promoted: Some(promoted[0]) }) }
|
||||||
+ _2 = &(*_6); // scope 0 at $DIR/const-promotion-extern-static.rs:13:31: 13:46
|
+ _2 = &(*_6); // scope 0 at $DIR/const-promotion-extern-static.rs:13:31: 13:46
|
||||||
_1 = move _2 as &[&i32] (Pointer(Unsize)); // scope 0 at $DIR/const-promotion-extern-static.rs:13:31: 13:46
|
_1 = move _2 as &[&i32] (Pointer(Unsize)); // scope 0 at $DIR/const-promotion-extern-static.rs:13:31: 13:46
|
||||||
- StorageDead(_4); // scope 0 at $DIR/const-promotion-extern-static.rs:13:45: 13:46
|
- StorageDead(_4); // scope 0 at $DIR/const-promotion-extern-static.rs:13:45: 13:46
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
// + val: Unevaluated(main, [], Some(promoted[0]))
|
// + val: Unevaluated(main, [], Some(promoted[0]))
|
||||||
// mir::Constant
|
// mir::Constant
|
||||||
// + span: $DIR/bad_op_unsafe_oob_for_slices.rs:5:25: 5:35
|
// + span: $DIR/bad_op_unsafe_oob_for_slices.rs:5:25: 5:35
|
||||||
// + literal: Const { ty: &[i32; 3], val: Unevaluated(Unevaluated { def: WithOptConstParam { did: DefId(0:3 ~ bad_op_unsafe_oob_for_slices[8240]::main), const_param_did: None }, substs: [], promoted: Some(promoted[0]) }) }
|
// + literal: Const { ty: &[i32; 3], val: Unevaluated(Unevaluated { def: WithOptConstParam { did: DefId(0:3 ~ bad_op_unsafe_oob_for_slices[317d]::main), const_param_did: None }, substs: [], promoted: Some(promoted[0]) }) }
|
||||||
_3 = _9; // scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:5:25: 5:35
|
_3 = _9; // scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:5:25: 5:35
|
||||||
_2 = &raw const (*_3); // scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:5:25: 5:35
|
_2 = &raw const (*_3); // scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:5:25: 5:35
|
||||||
_1 = move _2 as *const [i32] (Pointer(Unsize)); // scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:5:25: 5:35
|
_1 = move _2 as *const [i32] (Pointer(Unsize)); // scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:5:25: 5:35
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
// + val: Unevaluated(main, [], Some(promoted[0]))
|
// + val: Unevaluated(main, [], Some(promoted[0]))
|
||||||
// mir::Constant
|
// mir::Constant
|
||||||
// + span: $DIR/bad_op_unsafe_oob_for_slices.rs:5:25: 5:35
|
// + span: $DIR/bad_op_unsafe_oob_for_slices.rs:5:25: 5:35
|
||||||
// + literal: Const { ty: &[i32; 3], val: Unevaluated(Unevaluated { def: WithOptConstParam { did: DefId(0:3 ~ bad_op_unsafe_oob_for_slices[8240]::main), const_param_did: None }, substs: [], promoted: Some(promoted[0]) }) }
|
// + literal: Const { ty: &[i32; 3], val: Unevaluated(Unevaluated { def: WithOptConstParam { did: DefId(0:3 ~ bad_op_unsafe_oob_for_slices[317d]::main), const_param_did: None }, substs: [], promoted: Some(promoted[0]) }) }
|
||||||
_3 = _9; // scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:5:25: 5:35
|
_3 = _9; // scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:5:25: 5:35
|
||||||
_2 = &raw const (*_3); // scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:5:25: 5:35
|
_2 = &raw const (*_3); // scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:5:25: 5:35
|
||||||
_1 = move _2 as *const [i32] (Pointer(Unsize)); // scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:5:25: 5:35
|
_1 = move _2 as *const [i32] (Pointer(Unsize)); // scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:5:25: 5:35
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
// + val: Unevaluated(FOO, [], None)
|
// + val: Unevaluated(FOO, [], None)
|
||||||
// mir::Constant
|
// mir::Constant
|
||||||
// + span: $DIR/const_prop_fails_gracefully.rs:7:13: 7:16
|
// + span: $DIR/const_prop_fails_gracefully.rs:7:13: 7:16
|
||||||
// + literal: Const { ty: &i32, val: Unevaluated(Unevaluated { def: WithOptConstParam { did: DefId(0:5 ~ const_prop_fails_gracefully[2706]::main::FOO), const_param_did: None }, substs: [], promoted: None }) }
|
// + literal: Const { ty: &i32, val: Unevaluated(Unevaluated { def: WithOptConstParam { did: DefId(0:5 ~ const_prop_fails_gracefully[317d]::main::FOO), const_param_did: None }, substs: [], promoted: None }) }
|
||||||
_2 = &raw const (*_3); // scope 0 at $DIR/const_prop_fails_gracefully.rs:7:13: 7:16
|
_2 = &raw const (*_3); // scope 0 at $DIR/const_prop_fails_gracefully.rs:7:13: 7:16
|
||||||
_1 = move _2 as usize (Misc); // scope 0 at $DIR/const_prop_fails_gracefully.rs:7:13: 7:39
|
_1 = move _2 as usize (Misc); // scope 0 at $DIR/const_prop_fails_gracefully.rs:7:13: 7:39
|
||||||
StorageDead(_2); // scope 0 at $DIR/const_prop_fails_gracefully.rs:7:38: 7:39
|
StorageDead(_2); // scope 0 at $DIR/const_prop_fails_gracefully.rs:7:38: 7:39
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
// + val: Unevaluated(main, [], Some(promoted[0]))
|
// + val: Unevaluated(main, [], Some(promoted[0]))
|
||||||
// mir::Constant
|
// mir::Constant
|
||||||
// + span: $DIR/ref_deref.rs:5:6: 5:10
|
// + span: $DIR/ref_deref.rs:5:6: 5:10
|
||||||
// + literal: Const { ty: &i32, val: Unevaluated(Unevaluated { def: WithOptConstParam { did: DefId(0:3 ~ ref_deref[cb9b]::main), const_param_did: None }, substs: [], promoted: Some(promoted[0]) }) }
|
// + literal: Const { ty: &i32, val: Unevaluated(Unevaluated { def: WithOptConstParam { did: DefId(0:3 ~ ref_deref[317d]::main), const_param_did: None }, substs: [], promoted: Some(promoted[0]) }) }
|
||||||
_2 = _4; // scope 0 at $DIR/ref_deref.rs:5:6: 5:10
|
_2 = _4; // scope 0 at $DIR/ref_deref.rs:5:6: 5:10
|
||||||
- _1 = (*_2); // scope 0 at $DIR/ref_deref.rs:5:5: 5:10
|
- _1 = (*_2); // scope 0 at $DIR/ref_deref.rs:5:5: 5:10
|
||||||
+ _1 = const 4_i32; // scope 0 at $DIR/ref_deref.rs:5:5: 5:10
|
+ _1 = const 4_i32; // scope 0 at $DIR/ref_deref.rs:5:5: 5:10
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
+ // + val: Unevaluated(main, [], Some(promoted[0]))
|
+ // + val: Unevaluated(main, [], Some(promoted[0]))
|
||||||
+ // mir::Constant
|
+ // mir::Constant
|
||||||
+ // + span: $DIR/ref_deref.rs:5:6: 5:10
|
+ // + span: $DIR/ref_deref.rs:5:6: 5:10
|
||||||
+ // + literal: Const { ty: &i32, val: Unevaluated(Unevaluated { def: WithOptConstParam { did: DefId(0:3 ~ ref_deref[cb9b]::main), const_param_did: None }, substs: [], promoted: Some(promoted[0]) }) }
|
+ // + literal: Const { ty: &i32, val: Unevaluated(Unevaluated { def: WithOptConstParam { did: DefId(0:3 ~ ref_deref[317d]::main), const_param_did: None }, substs: [], promoted: Some(promoted[0]) }) }
|
||||||
+ _2 = &(*_4); // scope 0 at $DIR/ref_deref.rs:5:6: 5:10
|
+ _2 = &(*_4); // scope 0 at $DIR/ref_deref.rs:5:6: 5:10
|
||||||
_1 = (*_2); // scope 0 at $DIR/ref_deref.rs:5:5: 5:10
|
_1 = (*_2); // scope 0 at $DIR/ref_deref.rs:5:5: 5:10
|
||||||
- StorageDead(_3); // scope 0 at $DIR/ref_deref.rs:5:10: 5:11
|
- StorageDead(_3); // scope 0 at $DIR/ref_deref.rs:5:10: 5:11
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
// + val: Unevaluated(main, [], Some(promoted[0]))
|
// + val: Unevaluated(main, [], Some(promoted[0]))
|
||||||
// mir::Constant
|
// mir::Constant
|
||||||
// + span: $DIR/ref_deref_project.rs:5:6: 5:17
|
// + span: $DIR/ref_deref_project.rs:5:6: 5:17
|
||||||
// + literal: Const { ty: &(i32, i32), val: Unevaluated(Unevaluated { def: WithOptConstParam { did: DefId(0:3 ~ ref_deref_project[e8c3]::main), const_param_did: None }, substs: [], promoted: Some(promoted[0]) }) }
|
// + literal: Const { ty: &(i32, i32), val: Unevaluated(Unevaluated { def: WithOptConstParam { did: DefId(0:3 ~ ref_deref_project[317d]::main), const_param_did: None }, substs: [], promoted: Some(promoted[0]) }) }
|
||||||
_2 = &((*_4).1: i32); // scope 0 at $DIR/ref_deref_project.rs:5:6: 5:17
|
_2 = &((*_4).1: i32); // scope 0 at $DIR/ref_deref_project.rs:5:6: 5:17
|
||||||
_1 = (*_2); // scope 0 at $DIR/ref_deref_project.rs:5:5: 5:17
|
_1 = (*_2); // scope 0 at $DIR/ref_deref_project.rs:5:5: 5:17
|
||||||
StorageDead(_2); // scope 0 at $DIR/ref_deref_project.rs:5:17: 5:18
|
StorageDead(_2); // scope 0 at $DIR/ref_deref_project.rs:5:17: 5:18
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
+ // + val: Unevaluated(main, [], Some(promoted[0]))
|
+ // + val: Unevaluated(main, [], Some(promoted[0]))
|
||||||
+ // mir::Constant
|
+ // mir::Constant
|
||||||
+ // + span: $DIR/ref_deref_project.rs:5:6: 5:17
|
+ // + span: $DIR/ref_deref_project.rs:5:6: 5:17
|
||||||
+ // + literal: Const { ty: &(i32, i32), val: Unevaluated(Unevaluated { def: WithOptConstParam { did: DefId(0:3 ~ ref_deref_project[e8c3]::main), const_param_did: None }, substs: [], promoted: Some(promoted[0]) }) }
|
+ // + literal: Const { ty: &(i32, i32), val: Unevaluated(Unevaluated { def: WithOptConstParam { did: DefId(0:3 ~ ref_deref_project[317d]::main), const_param_did: None }, substs: [], promoted: Some(promoted[0]) }) }
|
||||||
+ _2 = &((*_4).1: i32); // scope 0 at $DIR/ref_deref_project.rs:5:6: 5:17
|
+ _2 = &((*_4).1: i32); // scope 0 at $DIR/ref_deref_project.rs:5:6: 5:17
|
||||||
_1 = (*_2); // scope 0 at $DIR/ref_deref_project.rs:5:5: 5:17
|
_1 = (*_2); // scope 0 at $DIR/ref_deref_project.rs:5:5: 5:17
|
||||||
- StorageDead(_3); // scope 0 at $DIR/ref_deref_project.rs:5:17: 5:18
|
- StorageDead(_3); // scope 0 at $DIR/ref_deref_project.rs:5:17: 5:18
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
// + val: Unevaluated(main, [], Some(promoted[0]))
|
// + val: Unevaluated(main, [], Some(promoted[0]))
|
||||||
// mir::Constant
|
// mir::Constant
|
||||||
// + span: $DIR/slice_len.rs:5:6: 5:19
|
// + span: $DIR/slice_len.rs:5:6: 5:19
|
||||||
// + literal: Const { ty: &[u32; 3], val: Unevaluated(Unevaluated { def: WithOptConstParam { did: DefId(0:3 ~ slice_len[6547]::main), const_param_did: None }, substs: [], promoted: Some(promoted[0]) }) }
|
// + literal: Const { ty: &[u32; 3], val: Unevaluated(Unevaluated { def: WithOptConstParam { did: DefId(0:3 ~ slice_len[317d]::main), const_param_did: None }, substs: [], promoted: Some(promoted[0]) }) }
|
||||||
_4 = _9; // scope 0 at $DIR/slice_len.rs:5:6: 5:19
|
_4 = _9; // scope 0 at $DIR/slice_len.rs:5:6: 5:19
|
||||||
_3 = _4; // scope 0 at $DIR/slice_len.rs:5:6: 5:19
|
_3 = _4; // scope 0 at $DIR/slice_len.rs:5:6: 5:19
|
||||||
_2 = move _3 as &[u32] (Pointer(Unsize)); // scope 0 at $DIR/slice_len.rs:5:6: 5:19
|
_2 = move _3 as &[u32] (Pointer(Unsize)); // scope 0 at $DIR/slice_len.rs:5:6: 5:19
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
// + val: Unevaluated(main, [], Some(promoted[0]))
|
// + val: Unevaluated(main, [], Some(promoted[0]))
|
||||||
// mir::Constant
|
// mir::Constant
|
||||||
// + span: $DIR/slice_len.rs:5:6: 5:19
|
// + span: $DIR/slice_len.rs:5:6: 5:19
|
||||||
// + literal: Const { ty: &[u32; 3], val: Unevaluated(Unevaluated { def: WithOptConstParam { did: DefId(0:3 ~ slice_len[6547]::main), const_param_did: None }, substs: [], promoted: Some(promoted[0]) }) }
|
// + literal: Const { ty: &[u32; 3], val: Unevaluated(Unevaluated { def: WithOptConstParam { did: DefId(0:3 ~ slice_len[317d]::main), const_param_did: None }, substs: [], promoted: Some(promoted[0]) }) }
|
||||||
_4 = _9; // scope 0 at $DIR/slice_len.rs:5:6: 5:19
|
_4 = _9; // scope 0 at $DIR/slice_len.rs:5:6: 5:19
|
||||||
_3 = _4; // scope 0 at $DIR/slice_len.rs:5:6: 5:19
|
_3 = _4; // scope 0 at $DIR/slice_len.rs:5:6: 5:19
|
||||||
_2 = move _3 as &[u32] (Pointer(Unsize)); // scope 0 at $DIR/slice_len.rs:5:6: 5:19
|
_2 = move _3 as &[u32] (Pointer(Unsize)); // scope 0 at $DIR/slice_len.rs:5:6: 5:19
|
||||||
|
@ -38,7 +38,7 @@ fn bar() -> bool {
|
|||||||
// + val: Unevaluated(bar, [], Some(promoted[1]))
|
// + val: Unevaluated(bar, [], Some(promoted[1]))
|
||||||
// mir::Constant
|
// mir::Constant
|
||||||
// + span: $DIR/inline-retag.rs:12:7: 12:9
|
// + span: $DIR/inline-retag.rs:12:7: 12:9
|
||||||
// + literal: Const { ty: &i32, val: Unevaluated(Unevaluated { def: WithOptConstParam { did: DefId(0:4 ~ inline_retag[a78c]::bar), const_param_did: None }, substs: [], promoted: Some(promoted[1]) }) }
|
// + literal: Const { ty: &i32, val: Unevaluated(Unevaluated { def: WithOptConstParam { did: DefId(0:4 ~ inline_retag[317d]::bar), const_param_did: None }, substs: [], promoted: Some(promoted[1]) }) }
|
||||||
Retag(_10); // scope 1 at $DIR/inline-retag.rs:12:7: 12:9
|
Retag(_10); // scope 1 at $DIR/inline-retag.rs:12:7: 12:9
|
||||||
_4 = &(*_10); // scope 1 at $DIR/inline-retag.rs:12:7: 12:9
|
_4 = &(*_10); // scope 1 at $DIR/inline-retag.rs:12:7: 12:9
|
||||||
Retag(_4); // scope 1 at $DIR/inline-retag.rs:12:7: 12:9
|
Retag(_4); // scope 1 at $DIR/inline-retag.rs:12:7: 12:9
|
||||||
@ -52,7 +52,7 @@ fn bar() -> bool {
|
|||||||
// + val: Unevaluated(bar, [], Some(promoted[0]))
|
// + val: Unevaluated(bar, [], Some(promoted[0]))
|
||||||
// mir::Constant
|
// mir::Constant
|
||||||
// + span: $DIR/inline-retag.rs:12:11: 12:14
|
// + span: $DIR/inline-retag.rs:12:11: 12:14
|
||||||
// + literal: Const { ty: &i32, val: Unevaluated(Unevaluated { def: WithOptConstParam { did: DefId(0:4 ~ inline_retag[a78c]::bar), const_param_did: None }, substs: [], promoted: Some(promoted[0]) }) }
|
// + literal: Const { ty: &i32, val: Unevaluated(Unevaluated { def: WithOptConstParam { did: DefId(0:4 ~ inline_retag[317d]::bar), const_param_did: None }, substs: [], promoted: Some(promoted[0]) }) }
|
||||||
Retag(_9); // scope 1 at $DIR/inline-retag.rs:12:11: 12:14
|
Retag(_9); // scope 1 at $DIR/inline-retag.rs:12:11: 12:14
|
||||||
_7 = &(*_9); // scope 1 at $DIR/inline-retag.rs:12:11: 12:14
|
_7 = &(*_9); // scope 1 at $DIR/inline-retag.rs:12:11: 12:14
|
||||||
Retag(_7); // scope 1 at $DIR/inline-retag.rs:12:11: 12:14
|
Retag(_7); // scope 1 at $DIR/inline-retag.rs:12:11: 12:14
|
||||||
|
@ -66,7 +66,7 @@
|
|||||||
// + val: Unevaluated(main, [], Some(promoted[0]))
|
// + val: Unevaluated(main, [], Some(promoted[0]))
|
||||||
// mir::Constant
|
// mir::Constant
|
||||||
// + span: $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
// + span: $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||||
// + literal: Const { ty: &i32, val: Unevaluated(Unevaluated { def: WithOptConstParam { did: DefId(0:3 ~ issue_73223[2d0f]::main), const_param_did: None }, substs: [], promoted: Some(promoted[0]) }) }
|
// + literal: Const { ty: &i32, val: Unevaluated(Unevaluated { def: WithOptConstParam { did: DefId(0:3 ~ issue_73223[317d]::main), const_param_did: None }, substs: [], promoted: Some(promoted[0]) }) }
|
||||||
_8 = _20; // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
_8 = _20; // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||||
(_6.0: &i32) = move _7; // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
(_6.0: &i32) = move _7; // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||||
(_6.1: &i32) = move _8; // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
(_6.1: &i32) = move _8; // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||||
|
@ -66,7 +66,7 @@
|
|||||||
// + val: Unevaluated(main, [], Some(promoted[0]))
|
// + val: Unevaluated(main, [], Some(promoted[0]))
|
||||||
// mir::Constant
|
// mir::Constant
|
||||||
// + span: $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
// + span: $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||||
// + literal: Const { ty: &i32, val: Unevaluated(Unevaluated { def: WithOptConstParam { did: DefId(0:3 ~ issue_73223[2d0f]::main), const_param_did: None }, substs: [], promoted: Some(promoted[0]) }) }
|
// + literal: Const { ty: &i32, val: Unevaluated(Unevaluated { def: WithOptConstParam { did: DefId(0:3 ~ issue_73223[317d]::main), const_param_did: None }, substs: [], promoted: Some(promoted[0]) }) }
|
||||||
_8 = _20; // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
_8 = _20; // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||||
(_6.0: &i32) = move _7; // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
(_6.0: &i32) = move _7; // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||||
(_6.1: &i32) = move _8; // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
(_6.1: &i32) = move _8; // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||||
|
@ -87,7 +87,7 @@
|
|||||||
// + val: Unevaluated(main, [], Some(promoted[0]))
|
// + val: Unevaluated(main, [], Some(promoted[0]))
|
||||||
// mir::Constant
|
// mir::Constant
|
||||||
// + span: $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
// + span: $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||||
// + literal: Const { ty: &i32, val: Unevaluated(Unevaluated { def: WithOptConstParam { did: DefId(0:3 ~ issue_73223[2d0f]::main), const_param_did: None }, substs: [], promoted: Some(promoted[0]) }) }
|
// + literal: Const { ty: &i32, val: Unevaluated(Unevaluated { def: WithOptConstParam { did: DefId(0:3 ~ issue_73223[317d]::main), const_param_did: None }, substs: [], promoted: Some(promoted[0]) }) }
|
||||||
_11 = _28; // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
_11 = _28; // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||||
(_9.0: &i32) = move _10; // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
(_9.0: &i32) = move _10; // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||||
(_9.1: &i32) = move _11; // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
(_9.1: &i32) = move _11; // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||||
|
@ -87,7 +87,7 @@
|
|||||||
// + val: Unevaluated(main, [], Some(promoted[0]))
|
// + val: Unevaluated(main, [], Some(promoted[0]))
|
||||||
// mir::Constant
|
// mir::Constant
|
||||||
// + span: $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
// + span: $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||||
// + literal: Const { ty: &i32, val: Unevaluated(Unevaluated { def: WithOptConstParam { did: DefId(0:3 ~ issue_73223[2d0f]::main), const_param_did: None }, substs: [], promoted: Some(promoted[0]) }) }
|
// + literal: Const { ty: &i32, val: Unevaluated(Unevaluated { def: WithOptConstParam { did: DefId(0:3 ~ issue_73223[317d]::main), const_param_did: None }, substs: [], promoted: Some(promoted[0]) }) }
|
||||||
_11 = _28; // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
_11 = _28; // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||||
(_9.0: &i32) = move _10; // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
(_9.0: &i32) = move _10; // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||||
(_9.1: &i32) = move _11; // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
(_9.1: &i32) = move _11; // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||||
|
@ -50,7 +50,7 @@
|
|||||||
// + val: Unevaluated(discriminant, [T], Some(promoted[2]))
|
// + val: Unevaluated(discriminant, [T], Some(promoted[2]))
|
||||||
// mir::Constant
|
// mir::Constant
|
||||||
// + span: $DIR/lower_intrinsics.rs:70:42: 70:44
|
// + span: $DIR/lower_intrinsics.rs:70:42: 70:44
|
||||||
// + literal: Const { ty: &i32, val: Unevaluated(Unevaluated { def: WithOptConstParam { did: DefId(0:27 ~ lower_intrinsics[2872]::discriminant), const_param_did: None }, substs: [T], promoted: Some(promoted[2]) }) }
|
// + literal: Const { ty: &i32, val: Unevaluated(Unevaluated { def: WithOptConstParam { did: DefId(0:27 ~ lower_intrinsics[8787]::discriminant), const_param_did: None }, substs: [T], promoted: Some(promoted[2]) }) }
|
||||||
_7 = &(*_19); // scope 0 at $DIR/lower_intrinsics.rs:70:42: 70:44
|
_7 = &(*_19); // scope 0 at $DIR/lower_intrinsics.rs:70:42: 70:44
|
||||||
_6 = &(*_7); // scope 0 at $DIR/lower_intrinsics.rs:70:42: 70:44
|
_6 = &(*_7); // scope 0 at $DIR/lower_intrinsics.rs:70:42: 70:44
|
||||||
- _5 = discriminant_value::<i32>(move _6) -> bb2; // scope 0 at $DIR/lower_intrinsics.rs:70:5: 70:45
|
- _5 = discriminant_value::<i32>(move _6) -> bb2; // scope 0 at $DIR/lower_intrinsics.rs:70:5: 70:45
|
||||||
@ -74,7 +74,7 @@
|
|||||||
// + val: Unevaluated(discriminant, [T], Some(promoted[1]))
|
// + val: Unevaluated(discriminant, [T], Some(promoted[1]))
|
||||||
// mir::Constant
|
// mir::Constant
|
||||||
// + span: $DIR/lower_intrinsics.rs:71:42: 71:45
|
// + span: $DIR/lower_intrinsics.rs:71:42: 71:45
|
||||||
// + literal: Const { ty: &(), val: Unevaluated(Unevaluated { def: WithOptConstParam { did: DefId(0:27 ~ lower_intrinsics[2872]::discriminant), const_param_did: None }, substs: [T], promoted: Some(promoted[1]) }) }
|
// + literal: Const { ty: &(), val: Unevaluated(Unevaluated { def: WithOptConstParam { did: DefId(0:27 ~ lower_intrinsics[8787]::discriminant), const_param_did: None }, substs: [T], promoted: Some(promoted[1]) }) }
|
||||||
_11 = &(*_18); // scope 0 at $DIR/lower_intrinsics.rs:71:42: 71:45
|
_11 = &(*_18); // scope 0 at $DIR/lower_intrinsics.rs:71:42: 71:45
|
||||||
_10 = &(*_11); // scope 0 at $DIR/lower_intrinsics.rs:71:42: 71:45
|
_10 = &(*_11); // scope 0 at $DIR/lower_intrinsics.rs:71:42: 71:45
|
||||||
- _9 = discriminant_value::<()>(move _10) -> bb3; // scope 0 at $DIR/lower_intrinsics.rs:71:5: 71:46
|
- _9 = discriminant_value::<()>(move _10) -> bb3; // scope 0 at $DIR/lower_intrinsics.rs:71:5: 71:46
|
||||||
@ -98,7 +98,7 @@
|
|||||||
// + val: Unevaluated(discriminant, [T], Some(promoted[0]))
|
// + val: Unevaluated(discriminant, [T], Some(promoted[0]))
|
||||||
// mir::Constant
|
// mir::Constant
|
||||||
// + span: $DIR/lower_intrinsics.rs:72:42: 72:47
|
// + span: $DIR/lower_intrinsics.rs:72:42: 72:47
|
||||||
// + literal: Const { ty: &E, val: Unevaluated(Unevaluated { def: WithOptConstParam { did: DefId(0:27 ~ lower_intrinsics[2872]::discriminant), const_param_did: None }, substs: [T], promoted: Some(promoted[0]) }) }
|
// + literal: Const { ty: &E, val: Unevaluated(Unevaluated { def: WithOptConstParam { did: DefId(0:27 ~ lower_intrinsics[8787]::discriminant), const_param_did: None }, substs: [T], promoted: Some(promoted[0]) }) }
|
||||||
_15 = &(*_17); // scope 0 at $DIR/lower_intrinsics.rs:72:42: 72:47
|
_15 = &(*_17); // scope 0 at $DIR/lower_intrinsics.rs:72:42: 72:47
|
||||||
_14 = &(*_15); // scope 0 at $DIR/lower_intrinsics.rs:72:42: 72:47
|
_14 = &(*_15); // scope 0 at $DIR/lower_intrinsics.rs:72:42: 72:47
|
||||||
- _13 = discriminant_value::<E>(move _14) -> bb4; // scope 0 at $DIR/lower_intrinsics.rs:72:5: 72:48
|
- _13 = discriminant_value::<E>(move _14) -> bb4; // scope 0 at $DIR/lower_intrinsics.rs:72:5: 72:48
|
||||||
|
@ -57,7 +57,7 @@ fn full_tested_match() -> () {
|
|||||||
// + val: Unevaluated(full_tested_match, [], Some(promoted[0]))
|
// + val: Unevaluated(full_tested_match, [], Some(promoted[0]))
|
||||||
// mir::Constant
|
// mir::Constant
|
||||||
// + span: $DIR/match_false_edges.rs:16:14: 16:15
|
// + span: $DIR/match_false_edges.rs:16:14: 16:15
|
||||||
// + literal: Const { ty: &std::option::Option<i32>, val: Unevaluated(Unevaluated { def: WithOptConstParam { did: DefId(0:5 ~ match_false_edges[4011]::full_tested_match), const_param_did: None }, substs: [], promoted: Some(promoted[0]) }) }
|
// + literal: Const { ty: &std::option::Option<i32>, val: Unevaluated(Unevaluated { def: WithOptConstParam { did: DefId(0:5 ~ match_false_edges[317d]::full_tested_match), const_param_did: None }, substs: [], promoted: Some(promoted[0]) }) }
|
||||||
_6 = &(((*_11) as Some).0: i32); // scope 0 at $DIR/match_false_edges.rs:16:14: 16:15
|
_6 = &(((*_11) as Some).0: i32); // scope 0 at $DIR/match_false_edges.rs:16:14: 16:15
|
||||||
_4 = &shallow _2; // scope 0 at $DIR/match_false_edges.rs:15:19: 15:27
|
_4 = &shallow _2; // scope 0 at $DIR/match_false_edges.rs:15:19: 15:27
|
||||||
StorageLive(_7); // scope 0 at $DIR/match_false_edges.rs:16:20: 16:27
|
StorageLive(_7); // scope 0 at $DIR/match_false_edges.rs:16:20: 16:27
|
||||||
|
@ -127,7 +127,7 @@ fn array_casts() -> () {
|
|||||||
// + val: Unevaluated(array_casts, [], Some(promoted[0]))
|
// + val: Unevaluated(array_casts, [], Some(promoted[0]))
|
||||||
// mir::Constant
|
// mir::Constant
|
||||||
// + span: $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
// + span: $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||||
// + literal: Const { ty: &usize, val: Unevaluated(Unevaluated { def: WithOptConstParam { did: DefId(0:15 ~ retag[13e7]::array_casts), const_param_did: None }, substs: [], promoted: Some(promoted[0]) }) }
|
// + literal: Const { ty: &usize, val: Unevaluated(Unevaluated { def: WithOptConstParam { did: DefId(0:15 ~ retag[317d]::array_casts), const_param_did: None }, substs: [], promoted: Some(promoted[0]) }) }
|
||||||
Retag(_35); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
Retag(_35); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||||
_18 = &(*_35); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
_18 = &(*_35); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||||
Retag(_18); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
Retag(_18); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||||
|
@ -113,7 +113,7 @@ fn main() -> () {
|
|||||||
StorageLive(_14); // scope 1 at $DIR/retag.rs:40:31: 43:6
|
StorageLive(_14); // scope 1 at $DIR/retag.rs:40:31: 43:6
|
||||||
_14 = [closure@main::{closure#0}]; // scope 1 at $DIR/retag.rs:40:31: 43:6
|
_14 = [closure@main::{closure#0}]; // scope 1 at $DIR/retag.rs:40:31: 43:6
|
||||||
// closure
|
// closure
|
||||||
// + def_id: DefId(0:14 ~ retag[13e7]::main::{closure#0})
|
// + def_id: DefId(0:14 ~ retag[317d]::main::{closure#0})
|
||||||
// + substs: [
|
// + substs: [
|
||||||
// i8,
|
// i8,
|
||||||
// for<'r> extern "rust-call" fn((&'r i32,)) -> &'r i32,
|
// for<'r> extern "rust-call" fn((&'r i32,)) -> &'r i32,
|
||||||
@ -153,7 +153,7 @@ fn main() -> () {
|
|||||||
// + val: Unevaluated(main, [], Some(promoted[0]))
|
// + val: Unevaluated(main, [], Some(promoted[0]))
|
||||||
// mir::Constant
|
// mir::Constant
|
||||||
// + span: $DIR/retag.rs:47:21: 47:23
|
// + span: $DIR/retag.rs:47:21: 47:23
|
||||||
// + literal: Const { ty: &i32, val: Unevaluated(Unevaluated { def: WithOptConstParam { did: DefId(0:13 ~ retag[13e7]::main), const_param_did: None }, substs: [], promoted: Some(promoted[0]) }) }
|
// + literal: Const { ty: &i32, val: Unevaluated(Unevaluated { def: WithOptConstParam { did: DefId(0:13 ~ retag[317d]::main), const_param_did: None }, substs: [], promoted: Some(promoted[0]) }) }
|
||||||
Retag(_28); // scope 7 at $DIR/retag.rs:47:21: 47:23
|
Retag(_28); // scope 7 at $DIR/retag.rs:47:21: 47:23
|
||||||
_23 = &(*_28); // scope 7 at $DIR/retag.rs:47:21: 47:23
|
_23 = &(*_28); // scope 7 at $DIR/retag.rs:47:21: 47:23
|
||||||
Retag(_23); // scope 7 at $DIR/retag.rs:47:21: 47:23
|
Retag(_23); // scope 7 at $DIR/retag.rs:47:21: 47:23
|
||||||
|
@ -2,13 +2,13 @@ error[E0080]: could not evaluate static initializer
|
|||||||
--> $DIR/tls.rs:12:25
|
--> $DIR/tls.rs:12:25
|
||||||
|
|
|
|
||||||
LL | unsafe { let _val = A; }
|
LL | unsafe { let _val = A; }
|
||||||
| ^ cannot access thread local static (DefId(0:6 ~ tls[f423]::A))
|
| ^ cannot access thread local static (DefId(0:6 ~ tls[317d]::A))
|
||||||
|
|
||||||
error[E0080]: could not evaluate static initializer
|
error[E0080]: could not evaluate static initializer
|
||||||
--> $DIR/tls.rs:19:26
|
--> $DIR/tls.rs:19:26
|
||||||
|
|
|
|
||||||
LL | unsafe { let _val = &A; }
|
LL | unsafe { let _val = &A; }
|
||||||
| ^ cannot access thread local static (DefId(0:6 ~ tls[f423]::A))
|
| ^ cannot access thread local static (DefId(0:6 ~ tls[317d]::A))
|
||||||
|
|
||||||
warning: skipping const checks
|
warning: skipping const checks
|
||||||
|
|
|
|
||||||
|
@ -12,7 +12,7 @@ note: generator is not `Send` as this value is used across a yield
|
|||||||
--> $DIR/generator-print-verbose-1.rs:35:9
|
--> $DIR/generator-print-verbose-1.rs:35:9
|
||||||
|
|
|
|
||||||
LL | let _non_send_gen = make_non_send_generator();
|
LL | let _non_send_gen = make_non_send_generator();
|
||||||
| ------------- has type `Opaque(DefId(0:34 ~ generator_print_verbose_1[70c9]::make_non_send_generator::{opaque#0}), [])` which is not `Send`
|
| ------------- has type `Opaque(DefId(0:34 ~ generator_print_verbose_1[317d]::make_non_send_generator::{opaque#0}), [])` which is not `Send`
|
||||||
LL | yield;
|
LL | yield;
|
||||||
| ^^^^^ yield occurs here, with `_non_send_gen` maybe used later
|
| ^^^^^ yield occurs here, with `_non_send_gen` maybe used later
|
||||||
LL | };
|
LL | };
|
||||||
@ -30,10 +30,10 @@ LL | require_send(send_gen);
|
|||||||
= help: the trait `Sync` is not implemented for `RefCell<i32>`
|
= help: the trait `Sync` is not implemented for `RefCell<i32>`
|
||||||
= note: required because of the requirements on the impl of `Send` for `Arc<RefCell<i32>>`
|
= note: required because of the requirements on the impl of `Send` for `Arc<RefCell<i32>>`
|
||||||
= note: required because it appears within the type `[make_gen2<Arc<RefCell<i32>>>::{closure#0} upvar_tys=(Arc<RefCell<i32>>) {()}]`
|
= note: required because it appears within the type `[make_gen2<Arc<RefCell<i32>>>::{closure#0} upvar_tys=(Arc<RefCell<i32>>) {()}]`
|
||||||
= note: required because it appears within the type `Opaque(DefId(0:39 ~ generator_print_verbose_1[70c9]::make_gen2::{opaque#0}), [std::sync::Arc<std::cell::RefCell<i32>>])`
|
= note: required because it appears within the type `Opaque(DefId(0:39 ~ generator_print_verbose_1[317d]::make_gen2::{opaque#0}), [std::sync::Arc<std::cell::RefCell<i32>>])`
|
||||||
= note: required because it appears within the type `Opaque(DefId(0:42 ~ generator_print_verbose_1[70c9]::make_non_send_generator2::{opaque#0}), [])`
|
= note: required because it appears within the type `Opaque(DefId(0:42 ~ generator_print_verbose_1[317d]::make_non_send_generator2::{opaque#0}), [])`
|
||||||
= note: required because it appears within the type `{Opaque(DefId(0:42 ~ generator_print_verbose_1[70c9]::make_non_send_generator2::{opaque#0}), []), ()}`
|
= note: required because it appears within the type `{Opaque(DefId(0:42 ~ generator_print_verbose_1[317d]::make_non_send_generator2::{opaque#0}), []), ()}`
|
||||||
= note: required because it appears within the type `[test2::{closure#0} upvar_tys=() {Opaque(DefId(0:42 ~ generator_print_verbose_1[70c9]::make_non_send_generator2::{opaque#0}), []), ()}]`
|
= note: required because it appears within the type `[test2::{closure#0} upvar_tys=() {Opaque(DefId(0:42 ~ generator_print_verbose_1[317d]::make_non_send_generator2::{opaque#0}), []), ()}]`
|
||||||
|
|
||||||
error: aborting due to 2 previous errors
|
error: aborting due to 2 previous errors
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
warning: Linking globals named 'foo': symbol multiply defined!
|
warning: Linking globals named 'foo': symbol multiply defined!
|
||||||
|
|
||||||
error: failed to load bc of "lto-duplicate-symbols2.lto_duplicate_symbols2.288b404e693a75b4-cgu.0.rcgu.o":
|
error: failed to load bc of "lto-duplicate-symbols2.lto_duplicate_symbols2.3a1fbbbh-cgu.0.rcgu.o":
|
||||||
|
|
||||||
error: aborting due to previous error; 1 warning emitted
|
error: aborting due to previous error; 1 warning emitted
|
||||||
|
|
||||||
|
@ -1,18 +1,3 @@
|
|||||||
error: lifetime parameter `'a` only used once
|
|
||||||
--> $DIR/one-use-in-fn-argument-in-band.rs:11:10
|
|
||||||
|
|
|
||||||
LL | fn a(x: &'a u32, y: &'b u32) {
|
|
||||||
| ^^-
|
|
||||||
| |
|
|
||||||
| this lifetime is only used here
|
|
||||||
| help: elide the single-use lifetime
|
|
||||||
|
|
|
||||||
note: the lint level is defined here
|
|
||||||
--> $DIR/one-use-in-fn-argument-in-band.rs:4:9
|
|
||||||
|
|
|
||||||
LL | #![deny(single_use_lifetimes)]
|
|
||||||
| ^^^^^^^^^^^^^^^^^^^^
|
|
||||||
|
|
||||||
error: lifetime parameter `'b` only used once
|
error: lifetime parameter `'b` only used once
|
||||||
--> $DIR/one-use-in-fn-argument-in-band.rs:11:22
|
--> $DIR/one-use-in-fn-argument-in-band.rs:11:22
|
||||||
|
|
|
|
||||||
@ -21,6 +6,21 @@ LL | fn a(x: &'a u32, y: &'b u32) {
|
|||||||
| |
|
| |
|
||||||
| this lifetime is only used here
|
| this lifetime is only used here
|
||||||
| help: elide the single-use lifetime
|
| help: elide the single-use lifetime
|
||||||
|
|
|
||||||
|
note: the lint level is defined here
|
||||||
|
--> $DIR/one-use-in-fn-argument-in-band.rs:4:9
|
||||||
|
|
|
||||||
|
LL | #![deny(single_use_lifetimes)]
|
||||||
|
| ^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
error: lifetime parameter `'a` only used once
|
||||||
|
--> $DIR/one-use-in-fn-argument-in-band.rs:11:10
|
||||||
|
|
|
||||||
|
LL | fn a(x: &'a u32, y: &'b u32) {
|
||||||
|
| ^^-
|
||||||
|
| |
|
||||||
|
| this lifetime is only used here
|
||||||
|
| help: elide the single-use lifetime
|
||||||
|
|
||||||
error: aborting due to 2 previous errors
|
error: aborting due to 2 previous errors
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
error: cannot specialize on `Binder(ProjectionPredicate(ProjectionTy { substs: [V], item_def_id: DefId(0:6 ~ repeated_projection_type[b09c]::Id::This) }, (I,)), [])`
|
error: cannot specialize on `Binder(ProjectionPredicate(ProjectionTy { substs: [V], item_def_id: DefId(0:6 ~ repeated_projection_type[317d]::Id::This) }, (I,)), [])`
|
||||||
--> $DIR/repeated_projection_type.rs:19:1
|
--> $DIR/repeated_projection_type.rs:19:1
|
||||||
|
|
|
|
||||||
LL | / impl<I, V: Id<This = (I,)>> X for V {
|
LL | / impl<I, V: Id<This = (I,)>> X for V {
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
error: symbol-name(_ZN5basic4main17hd75b915511563828E)
|
error: symbol-name(_ZN5basic4main17h6c535bbea2051f85E)
|
||||||
--> $DIR/basic.rs:8:1
|
--> $DIR/basic.rs:8:1
|
||||||
|
|
|
|
||||||
LL | #[rustc_symbol_name]
|
LL | #[rustc_symbol_name]
|
||||||
| ^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
error: demangling(basic::main::hd75b915511563828)
|
error: demangling(basic::main::h6c535bbea2051f85)
|
||||||
--> $DIR/basic.rs:8:1
|
--> $DIR/basic.rs:8:1
|
||||||
|
|
|
|
||||||
LL | #[rustc_symbol_name]
|
LL | #[rustc_symbol_name]
|
||||||
|
@ -9,8 +9,8 @@
|
|||||||
//[legacy]~^ ERROR symbol-name(_ZN5basic4main
|
//[legacy]~^ ERROR symbol-name(_ZN5basic4main
|
||||||
//[legacy]~| ERROR demangling(basic::main
|
//[legacy]~| ERROR demangling(basic::main
|
||||||
//[legacy]~| ERROR demangling-alt(basic::main)
|
//[legacy]~| ERROR demangling-alt(basic::main)
|
||||||
//[v0]~^^^^ ERROR symbol-name(_RNvCsj6j3mjPNGKx_5basic4main)
|
//[v0]~^^^^ ERROR symbol-name(_RNvCs21hi0yVfW1J_5basic4main)
|
||||||
//[v0]~| ERROR demangling(basic[de7d5b6b69c71f37]::main)
|
//[v0]~| ERROR demangling(basic[17891616a171812d]::main)
|
||||||
//[v0]~| ERROR demangling-alt(basic::main)
|
//[v0]~| ERROR demangling-alt(basic::main)
|
||||||
#[rustc_def_path]
|
#[rustc_def_path]
|
||||||
//[legacy]~^ ERROR def-path(main)
|
//[legacy]~^ ERROR def-path(main)
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
error: symbol-name(_RNvCsj6j3mjPNGKx_5basic4main)
|
error: symbol-name(_RNvCs21hi0yVfW1J_5basic4main)
|
||||||
--> $DIR/basic.rs:8:1
|
--> $DIR/basic.rs:8:1
|
||||||
|
|
|
|
||||||
LL | #[rustc_symbol_name]
|
LL | #[rustc_symbol_name]
|
||||||
| ^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
error: demangling(basic[de7d5b6b69c71f37]::main)
|
error: demangling(basic[17891616a171812d]::main)
|
||||||
--> $DIR/basic.rs:8:1
|
--> $DIR/basic.rs:8:1
|
||||||
|
|
|
|
||||||
LL | #[rustc_symbol_name]
|
LL | #[rustc_symbol_name]
|
||||||
|
@ -5,32 +5,32 @@
|
|||||||
pub struct Unsigned<const F: u8>;
|
pub struct Unsigned<const F: u8>;
|
||||||
|
|
||||||
#[rustc_symbol_name]
|
#[rustc_symbol_name]
|
||||||
//~^ ERROR symbol-name(_RMCsaP8qXevlYG3_25const_generics_demanglingINtB0_8UnsignedKhb_E)
|
//~^ ERROR symbol-name(_RMCs21hi0yVfW1J_25const_generics_demanglingINtB0_8UnsignedKhb_E)
|
||||||
//~| ERROR demangling(<const_generics_demangling[7e153590edc26969]::Unsigned<11: u8>>)
|
//~| ERROR demangling(<const_generics_demangling[17891616a171812d]::Unsigned<11: u8>>)
|
||||||
//~| ERROR demangling-alt(<const_generics_demangling::Unsigned<11>>)
|
//~| ERROR demangling-alt(<const_generics_demangling::Unsigned<11>>)
|
||||||
impl Unsigned<11> {}
|
impl Unsigned<11> {}
|
||||||
|
|
||||||
pub struct Signed<const F: i16>;
|
pub struct Signed<const F: i16>;
|
||||||
|
|
||||||
#[rustc_symbol_name]
|
#[rustc_symbol_name]
|
||||||
//~^ ERROR symbol-name(_RMs_CsaP8qXevlYG3_25const_generics_demanglingINtB2_6SignedKsn98_E)
|
//~^ ERROR symbol-name(_RMs_Cs21hi0yVfW1J_25const_generics_demanglingINtB2_6SignedKsn98_E)
|
||||||
//~| ERROR demangling(<const_generics_demangling[7e153590edc26969]::Signed<-152: i16>>)
|
//~| ERROR demangling(<const_generics_demangling[17891616a171812d]::Signed<-152: i16>>)
|
||||||
//~| ERROR demangling-alt(<const_generics_demangling::Signed<-152>>)
|
//~| ERROR demangling-alt(<const_generics_demangling::Signed<-152>>)
|
||||||
impl Signed<-152> {}
|
impl Signed<-152> {}
|
||||||
|
|
||||||
pub struct Bool<const F: bool>;
|
pub struct Bool<const F: bool>;
|
||||||
|
|
||||||
#[rustc_symbol_name]
|
#[rustc_symbol_name]
|
||||||
//~^ ERROR symbol-name(_RMs0_CsaP8qXevlYG3_25const_generics_demanglingINtB3_4BoolKb1_E)
|
//~^ ERROR symbol-name(_RMs0_Cs21hi0yVfW1J_25const_generics_demanglingINtB3_4BoolKb1_E)
|
||||||
//~| ERROR demangling(<const_generics_demangling[7e153590edc26969]::Bool<true: bool>>)
|
//~| ERROR demangling(<const_generics_demangling[17891616a171812d]::Bool<true: bool>>)
|
||||||
//~| ERROR demangling-alt(<const_generics_demangling::Bool<true>>)
|
//~| ERROR demangling-alt(<const_generics_demangling::Bool<true>>)
|
||||||
impl Bool<true> {}
|
impl Bool<true> {}
|
||||||
|
|
||||||
pub struct Char<const F: char>;
|
pub struct Char<const F: char>;
|
||||||
|
|
||||||
#[rustc_symbol_name]
|
#[rustc_symbol_name]
|
||||||
//~^ ERROR symbol-name(_RMs1_CsaP8qXevlYG3_25const_generics_demanglingINtB3_4CharKc2202_E)
|
//~^ ERROR symbol-name(_RMs1_Cs21hi0yVfW1J_25const_generics_demanglingINtB3_4CharKc2202_E)
|
||||||
//~| ERROR demangling(<const_generics_demangling[7e153590edc26969]::Char<'∂': char>>)
|
//~| ERROR demangling(<const_generics_demangling[17891616a171812d]::Char<'∂': char>>)
|
||||||
//~| ERROR demangling-alt(<const_generics_demangling::Char<'∂'>>)
|
//~| ERROR demangling-alt(<const_generics_demangling::Char<'∂'>>)
|
||||||
impl Char<'∂'> {}
|
impl Char<'∂'> {}
|
||||||
|
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
error: symbol-name(_RMCsaP8qXevlYG3_25const_generics_demanglingINtB0_8UnsignedKhb_E)
|
error: symbol-name(_RMCs21hi0yVfW1J_25const_generics_demanglingINtB0_8UnsignedKhb_E)
|
||||||
--> $DIR/const-generics-demangling.rs:7:1
|
--> $DIR/const-generics-demangling.rs:7:1
|
||||||
|
|
|
|
||||||
LL | #[rustc_symbol_name]
|
LL | #[rustc_symbol_name]
|
||||||
| ^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
error: demangling(<const_generics_demangling[7e153590edc26969]::Unsigned<11: u8>>)
|
error: demangling(<const_generics_demangling[17891616a171812d]::Unsigned<11: u8>>)
|
||||||
--> $DIR/const-generics-demangling.rs:7:1
|
--> $DIR/const-generics-demangling.rs:7:1
|
||||||
|
|
|
|
||||||
LL | #[rustc_symbol_name]
|
LL | #[rustc_symbol_name]
|
||||||
@ -16,13 +16,13 @@ error: demangling-alt(<const_generics_demangling::Unsigned<11>>)
|
|||||||
LL | #[rustc_symbol_name]
|
LL | #[rustc_symbol_name]
|
||||||
| ^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
error: symbol-name(_RMs_CsaP8qXevlYG3_25const_generics_demanglingINtB2_6SignedKsn98_E)
|
error: symbol-name(_RMs_Cs21hi0yVfW1J_25const_generics_demanglingINtB2_6SignedKsn98_E)
|
||||||
--> $DIR/const-generics-demangling.rs:15:1
|
--> $DIR/const-generics-demangling.rs:15:1
|
||||||
|
|
|
|
||||||
LL | #[rustc_symbol_name]
|
LL | #[rustc_symbol_name]
|
||||||
| ^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
error: demangling(<const_generics_demangling[7e153590edc26969]::Signed<-152: i16>>)
|
error: demangling(<const_generics_demangling[17891616a171812d]::Signed<-152: i16>>)
|
||||||
--> $DIR/const-generics-demangling.rs:15:1
|
--> $DIR/const-generics-demangling.rs:15:1
|
||||||
|
|
|
|
||||||
LL | #[rustc_symbol_name]
|
LL | #[rustc_symbol_name]
|
||||||
@ -34,13 +34,13 @@ error: demangling-alt(<const_generics_demangling::Signed<-152>>)
|
|||||||
LL | #[rustc_symbol_name]
|
LL | #[rustc_symbol_name]
|
||||||
| ^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
error: symbol-name(_RMs0_CsaP8qXevlYG3_25const_generics_demanglingINtB3_4BoolKb1_E)
|
error: symbol-name(_RMs0_Cs21hi0yVfW1J_25const_generics_demanglingINtB3_4BoolKb1_E)
|
||||||
--> $DIR/const-generics-demangling.rs:23:1
|
--> $DIR/const-generics-demangling.rs:23:1
|
||||||
|
|
|
|
||||||
LL | #[rustc_symbol_name]
|
LL | #[rustc_symbol_name]
|
||||||
| ^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
error: demangling(<const_generics_demangling[7e153590edc26969]::Bool<true: bool>>)
|
error: demangling(<const_generics_demangling[17891616a171812d]::Bool<true: bool>>)
|
||||||
--> $DIR/const-generics-demangling.rs:23:1
|
--> $DIR/const-generics-demangling.rs:23:1
|
||||||
|
|
|
|
||||||
LL | #[rustc_symbol_name]
|
LL | #[rustc_symbol_name]
|
||||||
@ -52,13 +52,13 @@ error: demangling-alt(<const_generics_demangling::Bool<true>>)
|
|||||||
LL | #[rustc_symbol_name]
|
LL | #[rustc_symbol_name]
|
||||||
| ^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
error: symbol-name(_RMs1_CsaP8qXevlYG3_25const_generics_demanglingINtB3_4CharKc2202_E)
|
error: symbol-name(_RMs1_Cs21hi0yVfW1J_25const_generics_demanglingINtB3_4CharKc2202_E)
|
||||||
--> $DIR/const-generics-demangling.rs:31:1
|
--> $DIR/const-generics-demangling.rs:31:1
|
||||||
|
|
|
|
||||||
LL | #[rustc_symbol_name]
|
LL | #[rustc_symbol_name]
|
||||||
| ^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
error: demangling(<const_generics_demangling[7e153590edc26969]::Char<'∂': char>>)
|
error: demangling(<const_generics_demangling[17891616a171812d]::Char<'∂': char>>)
|
||||||
--> $DIR/const-generics-demangling.rs:31:1
|
--> $DIR/const-generics-demangling.rs:31:1
|
||||||
|
|
|
|
||||||
LL | #[rustc_symbol_name]
|
LL | #[rustc_symbol_name]
|
||||||
|
@ -15,8 +15,8 @@ mod foo {
|
|||||||
//[legacy]~^ ERROR symbol-name(_ZN5impl13foo3Foo3bar
|
//[legacy]~^ ERROR symbol-name(_ZN5impl13foo3Foo3bar
|
||||||
//[legacy]~| ERROR demangling(impl1::foo::Foo::bar
|
//[legacy]~| ERROR demangling(impl1::foo::Foo::bar
|
||||||
//[legacy]~| ERROR demangling-alt(impl1::foo::Foo::bar)
|
//[legacy]~| ERROR demangling-alt(impl1::foo::Foo::bar)
|
||||||
//[v0]~^^^^ ERROR symbol-name(_RNvMNtCs2qSCrjELJET_5impl13fooNtB2_3Foo3bar)
|
//[v0]~^^^^ ERROR symbol-name(_RNvMNtCs21hi0yVfW1J_5impl13fooNtB2_3Foo3bar)
|
||||||
//[v0]~| ERROR demangling(<impl1[1c5860ab79c9e305]::foo::Foo>::bar)
|
//[v0]~| ERROR demangling(<impl1[17891616a171812d]::foo::Foo>::bar)
|
||||||
//[v0]~| ERROR demangling-alt(<impl1::foo::Foo>::bar)
|
//[v0]~| ERROR demangling-alt(<impl1::foo::Foo>::bar)
|
||||||
#[rustc_def_path]
|
#[rustc_def_path]
|
||||||
//[legacy]~^ ERROR def-path(foo::Foo::bar)
|
//[legacy]~^ ERROR def-path(foo::Foo::bar)
|
||||||
@ -33,8 +33,8 @@ mod bar {
|
|||||||
//[legacy]~^ ERROR symbol-name(_ZN5impl13bar33_$LT$impl$u20$impl1..foo..Foo$GT$3baz
|
//[legacy]~^ ERROR symbol-name(_ZN5impl13bar33_$LT$impl$u20$impl1..foo..Foo$GT$3baz
|
||||||
//[legacy]~| ERROR demangling(impl1::bar::<impl impl1::foo::Foo>::baz
|
//[legacy]~| ERROR demangling(impl1::bar::<impl impl1::foo::Foo>::baz
|
||||||
//[legacy]~| ERROR demangling-alt(impl1::bar::<impl impl1::foo::Foo>::baz)
|
//[legacy]~| ERROR demangling-alt(impl1::bar::<impl impl1::foo::Foo>::baz)
|
||||||
//[v0]~^^^^ ERROR symbol-name(_RNvMNtCs2qSCrjELJET_5impl13barNtNtB4_3foo3Foo3baz)
|
//[v0]~^^^^ ERROR symbol-name(_RNvMNtCs21hi0yVfW1J_5impl13barNtNtB4_3foo3Foo3baz)
|
||||||
//[v0]~| ERROR demangling(<impl1[1c5860ab79c9e305]::foo::Foo>::baz)
|
//[v0]~| ERROR demangling(<impl1[17891616a171812d]::foo::Foo>::baz)
|
||||||
//[v0]~| ERROR demangling-alt(<impl1::foo::Foo>::baz)
|
//[v0]~| ERROR demangling-alt(<impl1::foo::Foo>::baz)
|
||||||
#[rustc_def_path]
|
#[rustc_def_path]
|
||||||
//[legacy]~^ ERROR def-path(bar::<impl foo::Foo>::baz)
|
//[legacy]~^ ERROR def-path(bar::<impl foo::Foo>::baz)
|
||||||
@ -63,8 +63,8 @@ fn main() {
|
|||||||
//[legacy]~^ ERROR symbol-name(_ZN209_$LT$$u5b$$RF$dyn$u20$impl1..Foo$u2b$Assoc$u20$$u3d$$u20$extern$u20$$u22$C$u22$$u20$fn$LP$$RF$u8$C$$u20$...$RP$$u2b$impl1..AutoTrait$u3b$$u20$3$u5d$$u20$as$u20$impl1..main..$u7b$$u7b$closure$u7d$$u7d$..Bar$GT$6method
|
//[legacy]~^ ERROR symbol-name(_ZN209_$LT$$u5b$$RF$dyn$u20$impl1..Foo$u2b$Assoc$u20$$u3d$$u20$extern$u20$$u22$C$u22$$u20$fn$LP$$RF$u8$C$$u20$...$RP$$u2b$impl1..AutoTrait$u3b$$u20$3$u5d$$u20$as$u20$impl1..main..$u7b$$u7b$closure$u7d$$u7d$..Bar$GT$6method
|
||||||
//[legacy]~| ERROR demangling(<[&dyn impl1::Foo+Assoc = extern "C" fn(&u8, ::.)+impl1::AutoTrait; 3] as impl1::main::{{closure}}::Bar>::method
|
//[legacy]~| ERROR demangling(<[&dyn impl1::Foo+Assoc = extern "C" fn(&u8, ::.)+impl1::AutoTrait; 3] as impl1::main::{{closure}}::Bar>::method
|
||||||
//[legacy]~| ERROR demangling-alt(<[&dyn impl1::Foo+Assoc = extern "C" fn(&u8, ::.)+impl1::AutoTrait; 3] as impl1::main::{{closure}}::Bar>::method)
|
//[legacy]~| ERROR demangling-alt(<[&dyn impl1::Foo+Assoc = extern "C" fn(&u8, ::.)+impl1::AutoTrait; 3] as impl1::main::{{closure}}::Bar>::method)
|
||||||
//[v0]~^^^^ ERROR symbol-name(_RNvXNCNvCs2qSCrjELJET_5impl14mains_0ARDNtB6_3Foop5AssocFG_KCRL0_hvEuNtB6_9AutoTraitEL_j3_NtB2_3Bar6method)
|
//[v0]~^^^^ ERROR symbol-name(_RNvXNCNvCs21hi0yVfW1J_5impl14mains_0ARDNtB6_3Foop5AssocFG_KCRL0_hvEuNtB6_9AutoTraitEL_j3_NtB2_3Bar6method)
|
||||||
//[v0]~| ERROR demangling(<[&dyn impl1[1c5860ab79c9e305]::Foo<Assoc = for<'a> extern "C" fn(&'a u8, ...)> + impl1[1c5860ab79c9e305]::AutoTrait; 3: usize] as impl1[1c5860ab79c9e305]::main::{closure#1}::Bar>::method)
|
//[v0]~| ERROR demangling(<[&dyn impl1[17891616a171812d]::Foo<Assoc = for<'a> extern "C" fn(&'a u8, ...)> + impl1[17891616a171812d]::AutoTrait; 3: usize] as impl1[17891616a171812d]::main::{closure#1}::Bar>::method)
|
||||||
//[v0]~| ERROR demangling-alt(<[&dyn impl1::Foo<Assoc = for<'a> extern "C" fn(&'a u8, ...)> + impl1::AutoTrait; 3] as impl1::main::{closure#1}::Bar>::method)
|
//[v0]~| ERROR demangling-alt(<[&dyn impl1::Foo<Assoc = for<'a> extern "C" fn(&'a u8, ...)> + impl1::AutoTrait; 3] as impl1::main::{closure#1}::Bar>::method)
|
||||||
#[rustc_def_path]
|
#[rustc_def_path]
|
||||||
//[legacy]~^ ERROR def-path(<[&dyn Foo<Assoc = for<'r> extern "C" fn(&'r u8, ...)> + AutoTrait; 3] as main::{closure#1}::Bar>::method)
|
//[legacy]~^ ERROR def-path(<[&dyn Foo<Assoc = for<'r> extern "C" fn(&'r u8, ...)> + AutoTrait; 3] as main::{closure#1}::Bar>::method)
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
error: symbol-name(_RNvMNtCs2qSCrjELJET_5impl13fooNtB2_3Foo3bar)
|
error: symbol-name(_RNvMNtCs21hi0yVfW1J_5impl13fooNtB2_3Foo3bar)
|
||||||
--> $DIR/impl1.rs:14:9
|
--> $DIR/impl1.rs:14:9
|
||||||
|
|
|
|
||||||
LL | #[rustc_symbol_name]
|
LL | #[rustc_symbol_name]
|
||||||
| ^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
error: demangling(<impl1[1c5860ab79c9e305]::foo::Foo>::bar)
|
error: demangling(<impl1[17891616a171812d]::foo::Foo>::bar)
|
||||||
--> $DIR/impl1.rs:14:9
|
--> $DIR/impl1.rs:14:9
|
||||||
|
|
|
|
||||||
LL | #[rustc_symbol_name]
|
LL | #[rustc_symbol_name]
|
||||||
@ -22,13 +22,13 @@ error: def-path(foo::Foo::bar)
|
|||||||
LL | #[rustc_def_path]
|
LL | #[rustc_def_path]
|
||||||
| ^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
error: symbol-name(_RNvMNtCs2qSCrjELJET_5impl13barNtNtB4_3foo3Foo3baz)
|
error: symbol-name(_RNvMNtCs21hi0yVfW1J_5impl13barNtNtB4_3foo3Foo3baz)
|
||||||
--> $DIR/impl1.rs:32:9
|
--> $DIR/impl1.rs:32:9
|
||||||
|
|
|
|
||||||
LL | #[rustc_symbol_name]
|
LL | #[rustc_symbol_name]
|
||||||
| ^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
error: demangling(<impl1[1c5860ab79c9e305]::foo::Foo>::baz)
|
error: demangling(<impl1[17891616a171812d]::foo::Foo>::baz)
|
||||||
--> $DIR/impl1.rs:32:9
|
--> $DIR/impl1.rs:32:9
|
||||||
|
|
|
|
||||||
LL | #[rustc_symbol_name]
|
LL | #[rustc_symbol_name]
|
||||||
@ -46,13 +46,13 @@ error: def-path(bar::<impl foo::Foo>::baz)
|
|||||||
LL | #[rustc_def_path]
|
LL | #[rustc_def_path]
|
||||||
| ^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
error: symbol-name(_RNvXNCNvCs2qSCrjELJET_5impl14mains_0ARDNtB6_3Foop5AssocFG_KCRL0_hvEuNtB6_9AutoTraitEL_j3_NtB2_3Bar6method)
|
error: symbol-name(_RNvXNCNvCs21hi0yVfW1J_5impl14mains_0ARDNtB6_3Foop5AssocFG_KCRL0_hvEuNtB6_9AutoTraitEL_j3_NtB2_3Bar6method)
|
||||||
--> $DIR/impl1.rs:62:13
|
--> $DIR/impl1.rs:62:13
|
||||||
|
|
|
|
||||||
LL | #[rustc_symbol_name]
|
LL | #[rustc_symbol_name]
|
||||||
| ^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
error: demangling(<[&dyn impl1[1c5860ab79c9e305]::Foo<Assoc = for<'a> extern "C" fn(&'a u8, ...)> + impl1[1c5860ab79c9e305]::AutoTrait; 3: usize] as impl1[1c5860ab79c9e305]::main::{closure#1}::Bar>::method)
|
error: demangling(<[&dyn impl1[17891616a171812d]::Foo<Assoc = for<'a> extern "C" fn(&'a u8, ...)> + impl1[17891616a171812d]::AutoTrait; 3: usize] as impl1[17891616a171812d]::main::{closure#1}::Bar>::method)
|
||||||
--> $DIR/impl1.rs:62:13
|
--> $DIR/impl1.rs:62:13
|
||||||
|
|
|
|
||||||
LL | #[rustc_symbol_name]
|
LL | #[rustc_symbol_name]
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
error: symbol-name(_ZN11issue_609253foo37Foo$LT$issue_60925..llv$u6d$..Foo$GT$3foo17h18eaa05e22e59176E)
|
error: symbol-name(_ZN11issue_609253foo37Foo$LT$issue_60925..llv$u6d$..Foo$GT$3foo17h6244e5288326926aE)
|
||||||
--> $DIR/issue-60925.rs:21:9
|
--> $DIR/issue-60925.rs:21:9
|
||||||
|
|
|
|
||||||
LL | #[rustc_symbol_name]
|
LL | #[rustc_symbol_name]
|
||||||
| ^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
error: demangling(issue_60925::foo::Foo<issue_60925::llvm::Foo>::foo::h18eaa05e22e59176)
|
error: demangling(issue_60925::foo::Foo<issue_60925::llvm::Foo>::foo::h6244e5288326926a)
|
||||||
--> $DIR/issue-60925.rs:21:9
|
--> $DIR/issue-60925.rs:21:9
|
||||||
|
|
|
|
||||||
LL | #[rustc_symbol_name]
|
LL | #[rustc_symbol_name]
|
||||||
|
@ -22,8 +22,8 @@ mod foo {
|
|||||||
//[legacy]~^ ERROR symbol-name(_ZN11issue_609253foo37Foo$LT$issue_60925..llv$u6d$..Foo$GT$3foo
|
//[legacy]~^ ERROR symbol-name(_ZN11issue_609253foo37Foo$LT$issue_60925..llv$u6d$..Foo$GT$3foo
|
||||||
//[legacy]~| ERROR demangling(issue_60925::foo::Foo<issue_60925::llvm::Foo>::foo
|
//[legacy]~| ERROR demangling(issue_60925::foo::Foo<issue_60925::llvm::Foo>::foo
|
||||||
//[legacy]~| ERROR demangling-alt(issue_60925::foo::Foo<issue_60925::llvm::Foo>::foo)
|
//[legacy]~| ERROR demangling-alt(issue_60925::foo::Foo<issue_60925::llvm::Foo>::foo)
|
||||||
//[v0]~^^^^ ERROR symbol-name(_RNvMNtCs8dUWfuENynB_11issue_609253fooINtB2_3FooNtNtB4_4llvm3FooE3foo)
|
//[v0]~^^^^ ERROR symbol-name(_RNvMNtCs21hi0yVfW1J_11issue_609253fooINtB2_3FooNtNtB4_4llvm3FooE3foo)
|
||||||
//[v0]~| ERROR demangling(<issue_60925[5fcbb46c6fac4139]::foo::Foo<issue_60925[5fcbb46c6fac4139]::llvm::Foo>>::foo)
|
//[v0]~| ERROR demangling(<issue_60925[17891616a171812d]::foo::Foo<issue_60925[17891616a171812d]::llvm::Foo>>::foo)
|
||||||
//[v0]~| ERROR demangling-alt(<issue_60925::foo::Foo<issue_60925::llvm::Foo>>::foo)
|
//[v0]~| ERROR demangling-alt(<issue_60925::foo::Foo<issue_60925::llvm::Foo>>::foo)
|
||||||
pub(crate) fn foo() {
|
pub(crate) fn foo() {
|
||||||
for _ in 0..0 {
|
for _ in 0..0 {
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
error: symbol-name(_RNvMNtCs8dUWfuENynB_11issue_609253fooINtB2_3FooNtNtB4_4llvm3FooE3foo)
|
error: symbol-name(_RNvMNtCs21hi0yVfW1J_11issue_609253fooINtB2_3FooNtNtB4_4llvm3FooE3foo)
|
||||||
--> $DIR/issue-60925.rs:21:9
|
--> $DIR/issue-60925.rs:21:9
|
||||||
|
|
|
|
||||||
LL | #[rustc_symbol_name]
|
LL | #[rustc_symbol_name]
|
||||||
| ^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
error: demangling(<issue_60925[5fcbb46c6fac4139]::foo::Foo<issue_60925[5fcbb46c6fac4139]::llvm::Foo>>::foo)
|
error: demangling(<issue_60925[17891616a171812d]::foo::Foo<issue_60925[17891616a171812d]::llvm::Foo>>::foo)
|
||||||
--> $DIR/issue-60925.rs:21:9
|
--> $DIR/issue-60925.rs:21:9
|
||||||
|
|
|
|
||||||
LL | #[rustc_symbol_name]
|
LL | #[rustc_symbol_name]
|
||||||
|
@ -42,8 +42,8 @@ where
|
|||||||
//[legacy]~^ ERROR symbol-name(_ZN72_$LT$issue_75326..Foo$LT$I$C$E$GT$$u20$as$u20$issue_75326..Iterator2$GT$4next
|
//[legacy]~^ ERROR symbol-name(_ZN72_$LT$issue_75326..Foo$LT$I$C$E$GT$$u20$as$u20$issue_75326..Iterator2$GT$4next
|
||||||
//[legacy]~| ERROR demangling(<issue_75326::Foo<I,E> as issue_75326::Iterator2>::next
|
//[legacy]~| ERROR demangling(<issue_75326::Foo<I,E> as issue_75326::Iterator2>::next
|
||||||
//[legacy]~| ERROR demangling-alt(<issue_75326::Foo<I,E> as issue_75326::Iterator2>::next)
|
//[legacy]~| ERROR demangling-alt(<issue_75326::Foo<I,E> as issue_75326::Iterator2>::next)
|
||||||
//[v0]~^^^^ ERROR symbol-name(_RNvXINICsiMBouZZ1iuD_11issue_75326s_0pppEINtB5_3FooppENtB5_9Iterator24nextB5_)
|
//[v0]~^^^^ ERROR symbol-name(_RNvXINICs21hi0yVfW1J_11issue_75326s_0pppEINtB5_3FooppENtB5_9Iterator24nextB5_)
|
||||||
//[v0]~| ERROR demangling(<issue_75326[dac9b7624645f95d]::Foo<_, _> as issue_75326[dac9b7624645f95d]::Iterator2>::next)
|
//[v0]~| ERROR demangling(<issue_75326[17891616a171812d]::Foo<_, _> as issue_75326[17891616a171812d]::Iterator2>::next)
|
||||||
//[v0]~| ERROR demangling-alt(<issue_75326::Foo<_, _> as issue_75326::Iterator2>::next)
|
//[v0]~| ERROR demangling-alt(<issue_75326::Foo<_, _> as issue_75326::Iterator2>::next)
|
||||||
fn next(&mut self) -> Option<Self::Item> {
|
fn next(&mut self) -> Option<Self::Item> {
|
||||||
self.find(|_| true)
|
self.find(|_| true)
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
error: symbol-name(_RNvXINICsiMBouZZ1iuD_11issue_75326s_0pppEINtB5_3FooppENtB5_9Iterator24nextB5_)
|
error: symbol-name(_RNvXINICs21hi0yVfW1J_11issue_75326s_0pppEINtB5_3FooppENtB5_9Iterator24nextB5_)
|
||||||
--> $DIR/issue-75326.rs:41:5
|
--> $DIR/issue-75326.rs:41:5
|
||||||
|
|
|
|
||||||
LL | #[rustc_symbol_name]
|
LL | #[rustc_symbol_name]
|
||||||
| ^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
error: demangling(<issue_75326[dac9b7624645f95d]::Foo<_, _> as issue_75326[dac9b7624645f95d]::Iterator2>::next)
|
error: demangling(<issue_75326[17891616a171812d]::Foo<_, _> as issue_75326[17891616a171812d]::Iterator2>::next)
|
||||||
--> $DIR/issue-75326.rs:41:5
|
--> $DIR/issue-75326.rs:41:5
|
||||||
|
|
|
|
||||||
LL | #[rustc_symbol_name]
|
LL | #[rustc_symbol_name]
|
||||||
|
@ -4,7 +4,7 @@ error: symbol-name(_RNvXCRATE_HASH13trait_objectsRDG_INtNtNtCRATE_HASH4core3ops8
|
|||||||
LL | #[rustc_symbol_name]
|
LL | #[rustc_symbol_name]
|
||||||
| ^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
error: demangling(<&dyn for<'a> core[HASH]::ops::function::FnMut<(&'a u8,), Output = ()> as trait_objects[3f8b57f879016e18]::Bar>::method)
|
error: demangling(<&dyn for<'a> core[HASH]::ops::function::FnMut<(&'a u8,), Output = ()> as trait_objects[17891616a171812d]::Bar>::method)
|
||||||
--> $DIR/trait-objects.rs:16:5
|
--> $DIR/trait-objects.rs:16:5
|
||||||
|
|
|
|
||||||
LL | #[rustc_symbol_name]
|
LL | #[rustc_symbol_name]
|
||||||
@ -22,7 +22,7 @@ error: symbol-name(_RNvXs_CRATE_HASH13trait_objectsRDG_INtNtNtCRATE_HASH4core3op
|
|||||||
LL | #[rustc_symbol_name]
|
LL | #[rustc_symbol_name]
|
||||||
| ^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
error: demangling(<&dyn for<'a> core[HASH]::ops::function::FnMut<(&'a u8,), Output = ()> + core[HASH]::marker::Send as trait_objects[3f8b57f879016e18]::Foo>::method)
|
error: demangling(<&dyn for<'a> core[HASH]::ops::function::FnMut<(&'a u8,), Output = ()> + core[HASH]::marker::Send as trait_objects[17891616a171812d]::Foo>::method)
|
||||||
--> $DIR/trait-objects.rs:28:5
|
--> $DIR/trait-objects.rs:28:5
|
||||||
|
|
|
|
||||||
LL | #[rustc_symbol_name]
|
LL | #[rustc_symbol_name]
|
||||||
@ -40,7 +40,7 @@ error: symbol-name(_RNvXs0_CRATE_HASH13trait_objectsRDG_INtNtNtCRATE_HASH4core3o
|
|||||||
LL | #[rustc_symbol_name]
|
LL | #[rustc_symbol_name]
|
||||||
| ^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
error: demangling(<&dyn for<'a> core[HASH]::ops::function::FnMut<(&'a u8,), Output = ()> + core[HASH]::marker::Send as trait_objects[3f8b57f879016e18]::Baz>::method)
|
error: demangling(<&dyn for<'a> core[HASH]::ops::function::FnMut<(&'a u8,), Output = ()> + core[HASH]::marker::Send as trait_objects[17891616a171812d]::Baz>::method)
|
||||||
--> $DIR/trait-objects.rs:40:5
|
--> $DIR/trait-objects.rs:40:5
|
||||||
|
|
|
|
||||||
LL | #[rustc_symbol_name]
|
LL | #[rustc_symbol_name]
|
||||||
|
Loading…
Reference in New Issue
Block a user