diff --git a/README.md b/README.md index 7f601d5ee58..7c229487d1c 100644 --- a/README.md +++ b/README.md @@ -83,7 +83,7 @@ by running it with the `--help` flag or reading the [rustc dev guide][rustcguide If you plan to use `x.py install` to create an installation, it is recommended that you set the `prefix` value in the `[install]` section to a directory. - Create install directory if you are not installing in default directory. + Create an install directory if you are not installing in the default directory. 4. Build and install: @@ -153,7 +153,7 @@ build. #### MSVC MSVC builds of Rust additionally require an installation of Visual Studio 2017 -(or later) so `rustc` can use its linker. The simplest way is to get the +(or later) so `rustc` can use its linker. The simplest way is to get [Visual Studio], check the “C++ build tools” and “Windows 10 SDK” workload. [Visual Studio]: https://visualstudio.microsoft.com/downloads/ diff --git a/compiler/rustc_borrowck/src/diagnostics/explain_borrow.rs b/compiler/rustc_borrowck/src/diagnostics/explain_borrow.rs index 72aee0267ac..68f9a7c5007 100644 --- a/compiler/rustc_borrowck/src/diagnostics/explain_borrow.rs +++ b/compiler/rustc_borrowck/src/diagnostics/explain_borrow.rs @@ -273,13 +273,17 @@ impl<'tcx> BorrowExplanation<'tcx> { _ => {} } } - pub(crate) fn add_lifetime_bound_suggestion_to_diagnostic( + + fn add_lifetime_bound_suggestion_to_diagnostic( &self, err: &mut Diagnostic, category: &ConstraintCategory<'tcx>, span: Span, region_name: &RegionName, ) { + if !span.is_desugaring(DesugaringKind::OpaqueTy) { + return; + } if let ConstraintCategory::OpaqueType = category { let suggestable_name = if region_name.was_named() { region_name.name } else { kw::UnderscoreLifetime }; diff --git a/compiler/rustc_borrowck/src/diagnostics/mutability_errors.rs b/compiler/rustc_borrowck/src/diagnostics/mutability_errors.rs index 0ad4abbce20..56721cc3f5c 100644 --- a/compiler/rustc_borrowck/src/diagnostics/mutability_errors.rs +++ b/compiler/rustc_borrowck/src/diagnostics/mutability_errors.rs @@ -1,3 +1,4 @@ +use rustc_errors::{Applicability, Diagnostic, DiagnosticBuilder, ErrorGuaranteed}; use rustc_hir as hir; use rustc_hir::Node; use rustc_middle::hir::map::Map; @@ -12,12 +13,11 @@ use rustc_middle::{ }; use rustc_span::source_map::DesugaringKind; use rustc_span::symbol::{kw, Symbol}; -use rustc_span::{BytePos, Span}; +use rustc_span::{sym, BytePos, Span}; use crate::diagnostics::BorrowedContentSource; use crate::MirBorrowckCtxt; use rustc_const_eval::util::collect_writes::FindAssignments; -use rustc_errors::{Applicability, Diagnostic}; #[derive(Copy, Clone, Debug, Eq, PartialEq)] pub(crate) enum AccessKind { @@ -614,6 +614,7 @@ impl<'a, 'tcx> MirBorrowckCtxt<'a, 'tcx> { "trait `IndexMut` is required to modify indexed content, \ but it is not implemented for `{ty}`", )); + self.suggest_map_index_mut_alternatives(ty, &mut err); } _ => (), } @@ -627,6 +628,20 @@ impl<'a, 'tcx> MirBorrowckCtxt<'a, 'tcx> { self.buffer_error(err); } + fn suggest_map_index_mut_alternatives( + &self, + ty: Ty<'_>, + err: &mut DiagnosticBuilder<'_, ErrorGuaranteed>, + ) { + let Some(adt) = ty.ty_adt_def() else { return }; + let did = adt.did(); + if self.infcx.tcx.is_diagnostic_item(sym::HashMap, did) + || self.infcx.tcx.is_diagnostic_item(sym::BTreeMap, did) + { + err.help(format!("to modify a `{ty}`, use `.get_mut()`, `.insert()` or the entry API")); + } + } + /// User cannot make signature of a trait mutable without changing the /// trait. So we find if this error belongs to a trait and if so we move /// suggestion to the trait or disable it if it is out of scope of this crate diff --git a/compiler/rustc_codegen_ssa/src/back/link.rs b/compiler/rustc_codegen_ssa/src/back/link.rs index 7f6947e3c79..d2f2c7bf798 100644 --- a/compiler/rustc_codegen_ssa/src/back/link.rs +++ b/compiler/rustc_codegen_ssa/src/back/link.rs @@ -1958,7 +1958,6 @@ fn linker_with_args<'a>( // Upstream rust libraries are not supposed to depend on our local native // libraries as that would violate the structure of the DAG, in that // scenario they are required to link to them as well in a shared fashion. - // (The current implementation still doesn't prevent it though, see the FIXME below.) // // Note that upstream rust libraries may contain native dependencies as // well, but they also can't depend on what we just started to add to the @@ -1979,15 +1978,16 @@ fn linker_with_args<'a>( // and move this option back to the top. cmd.add_as_needed(); - // FIXME: Move this below to other native libraries - // (or alternatively link all native libraries after their respective crates). - // This change is somewhat breaking in practice due to local static libraries being linked - // as whole-archive (#85144), so removing whole-archive may be a pre-requisite. + // Local native libraries of all kinds. + // + // If `-Zlink-native-libraries=false` is set, then the assumption is that an + // external build system already has the native dependencies defined, and it + // will provide them to the linker itself. if sess.opts.unstable_opts.link_native_libraries { add_local_native_libraries(cmd, sess, codegen_results); } - // Upstream rust libraries and their non-bundled static libraries + // Upstream rust libraries and their (possibly bundled) static native libraries. add_upstream_rust_crates( cmd, sess, @@ -1997,11 +1997,11 @@ fn linker_with_args<'a>( tmpdir, ); - // Upstream dynamic native libraries linked with `#[link]` attributes at and `-l` - // command line options. - // If -Zlink-native-libraries=false is set, then the assumption is that an - // external build system already has the native dependencies defined, and it - // will provide them to the linker itself. + // Dynamic native libraries from upstream crates. + // + // FIXME: Merge this to `add_upstream_rust_crates` so that all native libraries are linked + // together with their respective upstream crates, and in their originally specified order. + // This may be slightly breaking due to our use of `--as-needed` and needs a crater run. if sess.opts.unstable_opts.link_native_libraries { add_upstream_native_libraries(cmd, sess, codegen_results); } @@ -2415,7 +2415,7 @@ fn add_upstream_rust_crates<'a>( // or is an rlib already included via some other dylib crate, the symbols from // native libs will have already been included in that dylib. // - // If -Zlink-native-libraries=false is set, then the assumption is that an + // If `-Zlink-native-libraries=false` is set, then the assumption is that an // external build system already has the native dependencies defined, and it // will provide them to the linker itself. if sess.opts.unstable_opts.link_native_libraries { diff --git a/compiler/rustc_codegen_ssa/src/back/metadata.rs b/compiler/rustc_codegen_ssa/src/back/metadata.rs index 0302c28815a..b92e146bee2 100644 --- a/compiler/rustc_codegen_ssa/src/back/metadata.rs +++ b/compiler/rustc_codegen_ssa/src/back/metadata.rs @@ -187,12 +187,12 @@ pub enum MetadataPosition { Last, } -// For rlibs we "pack" rustc metadata into a dummy object file. When rustc -// creates a dylib crate type it will pass `--whole-archive` (or the -// platform equivalent) to include all object files from an rlib into the -// final dylib itself. This causes linkers to iterate and try to include all -// files located in an archive, so if metadata is stored in an archive then -// it needs to be of a form that the linker will be able to process. +// For rlibs we "pack" rustc metadata into a dummy object file. +// +// Historically it was needed because rustc linked rlibs as whole-archive in some cases. +// In that case linkers try to include all files located in an archive, so if metadata is stored +// in an archive then it needs to be of a form that the linker is able to process. +// Now it's not clear whether metadata still needs to be wrapped into an object file or not. // // Note, though, that we don't actually want this metadata to show up in any // final output of the compiler. Instead this is purely for rustc's own diff --git a/compiler/rustc_interface/src/passes.rs b/compiler/rustc_interface/src/passes.rs index 014cf88389e..b7fbda58eca 100644 --- a/compiler/rustc_interface/src/passes.rs +++ b/compiler/rustc_interface/src/passes.rs @@ -911,13 +911,13 @@ fn analysis(tcx: TyCtxt<'_>, (): ()) -> Result<()> { }); }, { - sess.time("liveness_and_intrinsic_checking", || { - tcx.hir().par_for_each_module(|module| { + sess.time("liveness_checking", || { + tcx.hir().par_body_owners(|def_id| { // this must run before MIR dump, because // "not all control paths return a value" is reported here. // // maybe move the check to a MIR pass? - tcx.ensure().check_mod_liveness(module); + tcx.ensure().check_liveness(def_id.to_def_id()); }); }); } diff --git a/compiler/rustc_lint/src/context.rs b/compiler/rustc_lint/src/context.rs index b95fc341db6..6586fe440f3 100644 --- a/compiler/rustc_lint/src/context.rs +++ b/compiler/rustc_lint/src/context.rs @@ -865,9 +865,14 @@ pub trait LintContext: Sized { if let Some(positional_arg_to_replace) = position_sp_to_replace { let name = if is_formatting_arg { named_arg_name + "$" } else { named_arg_name }; - + let span_to_replace = if let Ok(positional_arg_content) = + self.sess().source_map().span_to_snippet(positional_arg_to_replace) && positional_arg_content.starts_with(":") { + positional_arg_to_replace.shrink_to_lo() + } else { + positional_arg_to_replace + }; db.span_suggestion_verbose( - positional_arg_to_replace, + span_to_replace, "use the named argument by name to avoid ambiguity", name, Applicability::MaybeIncorrect, diff --git a/compiler/rustc_middle/src/query/mod.rs b/compiler/rustc_middle/src/query/mod.rs index f78f62e31d2..16de6ebfe58 100644 --- a/compiler/rustc_middle/src/query/mod.rs +++ b/compiler/rustc_middle/src/query/mod.rs @@ -818,8 +818,8 @@ rustc_queries! { desc { |tcx| "checking privacy in {}", describe_as_module(key, tcx) } } - query check_mod_liveness(key: LocalDefId) -> () { - desc { |tcx| "checking liveness of variables in {}", describe_as_module(key, tcx) } + query check_liveness(key: DefId) { + desc { |tcx| "checking liveness of variables in {}", tcx.def_path_str(key) } } /// Return the live symbols in the crate for dead code check. diff --git a/compiler/rustc_passes/src/liveness.rs b/compiler/rustc_passes/src/liveness.rs index 7124b84bfef..1f22ebc730a 100644 --- a/compiler/rustc_passes/src/liveness.rs +++ b/compiler/rustc_passes/src/liveness.rs @@ -89,11 +89,10 @@ use rustc_data_structures::fx::FxIndexMap; use rustc_errors::Applicability; use rustc_hir as hir; use rustc_hir::def::*; -use rustc_hir::def_id::LocalDefId; +use rustc_hir::def_id::{DefId, LocalDefId}; use rustc_hir::intravisit::{self, Visitor}; use rustc_hir::{Expr, HirId, HirIdMap, HirIdSet}; use rustc_index::vec::IndexVec; -use rustc_middle::hir::nested_filter; use rustc_middle::ty::query::Providers; use rustc_middle::ty::{self, DefIdTree, RootVariableMinCaptureList, Ty, TyCtxt}; use rustc_session::lint; @@ -139,12 +138,54 @@ fn live_node_kind_to_string(lnk: LiveNodeKind, tcx: TyCtxt<'_>) -> String { } } -fn check_mod_liveness(tcx: TyCtxt<'_>, module_def_id: LocalDefId) { - tcx.hir().visit_item_likes_in_module(module_def_id, &mut IrMaps::new(tcx)); +fn check_liveness(tcx: TyCtxt<'_>, def_id: DefId) { + let local_def_id = match def_id.as_local() { + None => return, + Some(def_id) => def_id, + }; + + // Don't run unused pass for #[derive()] + let parent = tcx.local_parent(local_def_id); + if let DefKind::Impl = tcx.def_kind(parent) + && tcx.has_attr(parent.to_def_id(), sym::automatically_derived) + { + return; + } + + // Don't run unused pass for #[naked] + if tcx.has_attr(def_id, sym::naked) { + return; + } + + let mut maps = IrMaps::new(tcx); + let body_id = tcx.hir().body_owned_by(local_def_id); + let hir_id = tcx.hir().body_owner(body_id); + let body = tcx.hir().body(body_id); + + if let Some(upvars) = tcx.upvars_mentioned(def_id) { + for &var_hir_id in upvars.keys() { + let var_name = tcx.hir().name(var_hir_id); + maps.add_variable(Upvar(var_hir_id, var_name)); + } + } + + // gather up the various local variables, significant expressions, + // and so forth: + maps.visit_body(body); + + // compute liveness + let mut lsets = Liveness::new(&mut maps, local_def_id); + let entry_ln = lsets.compute(&body, hir_id); + lsets.log_liveness(entry_ln, body_id.hir_id); + + // check for various error conditions + lsets.visit_body(body); + lsets.warn_about_unused_upvars(entry_ln); + lsets.warn_about_unused_args(body, entry_ln); } pub fn provide(providers: &mut Providers) { - *providers = Providers { check_mod_liveness, ..*providers }; + *providers = Providers { check_liveness, ..*providers }; } // ______________________________________________________________________ @@ -316,56 +357,6 @@ impl<'tcx> IrMaps<'tcx> { } impl<'tcx> Visitor<'tcx> for IrMaps<'tcx> { - type NestedFilter = nested_filter::OnlyBodies; - - fn nested_visit_map(&mut self) -> Self::Map { - self.tcx.hir() - } - - fn visit_body(&mut self, body: &'tcx hir::Body<'tcx>) { - debug!("visit_body {:?}", body.id()); - - // swap in a new set of IR maps for this body - let mut maps = IrMaps::new(self.tcx); - let hir_id = maps.tcx.hir().body_owner(body.id()); - let local_def_id = maps.tcx.hir().local_def_id(hir_id); - let def_id = local_def_id.to_def_id(); - - // Don't run unused pass for #[derive()] - let parent = self.tcx.local_parent(local_def_id); - if let DefKind::Impl = self.tcx.def_kind(parent) - && self.tcx.has_attr(parent.to_def_id(), sym::automatically_derived) - { - return; - } - - // Don't run unused pass for #[naked] - if self.tcx.has_attr(def_id, sym::naked) { - return; - } - - if let Some(upvars) = maps.tcx.upvars_mentioned(def_id) { - for &var_hir_id in upvars.keys() { - let var_name = maps.tcx.hir().name(var_hir_id); - maps.add_variable(Upvar(var_hir_id, var_name)); - } - } - - // gather up the various local variables, significant expressions, - // and so forth: - intravisit::walk_body(&mut maps, body); - - // compute liveness - let mut lsets = Liveness::new(&mut maps, local_def_id); - let entry_ln = lsets.compute(&body, hir_id); - lsets.log_liveness(entry_ln, body.id().hir_id); - - // check for various error conditions - lsets.visit_body(body); - lsets.warn_about_unused_upvars(entry_ln); - lsets.warn_about_unused_args(body, entry_ln); - } - fn visit_local(&mut self, local: &'tcx hir::Local<'tcx>) { self.add_from_pat(&local.pat); if local.els.is_some() { diff --git a/compiler/rustc_resolve/src/late/diagnostics.rs b/compiler/rustc_resolve/src/late/diagnostics.rs index 4175527da47..b545b979391 100644 --- a/compiler/rustc_resolve/src/late/diagnostics.rs +++ b/compiler/rustc_resolve/src/late/diagnostics.rs @@ -2180,7 +2180,7 @@ impl<'a: 'ast, 'ast> LateResolutionVisitor<'a, '_, 'ast> { err.emit() } - pub(crate) fn add_missing_lifetime_specifiers_label( + fn add_missing_lifetime_specifiers_label( &mut self, err: &mut Diagnostic, lifetime_refs: Vec, diff --git a/compiler/rustc_trait_selection/src/lib.rs b/compiler/rustc_trait_selection/src/lib.rs index 9c252fcfe1c..ce48d4c99e9 100644 --- a/compiler/rustc_trait_selection/src/lib.rs +++ b/compiler/rustc_trait_selection/src/lib.rs @@ -20,6 +20,7 @@ #![feature(let_else)] #![feature(if_let_guard)] #![feature(never_type)] +#![feature(type_alias_impl_trait)] #![recursion_limit = "512"] // For rustdoc #[macro_use] diff --git a/compiler/rustc_trait_selection/src/traits/coherence.rs b/compiler/rustc_trait_selection/src/traits/coherence.rs index 3bc08fba91a..292787d4dbb 100644 --- a/compiler/rustc_trait_selection/src/traits/coherence.rs +++ b/compiler/rustc_trait_selection/src/traits/coherence.rs @@ -6,16 +6,18 @@ use crate::infer::outlives::env::OutlivesEnvironment; use crate::infer::{CombinedSnapshot, InferOk}; +use crate::traits::outlives_bounds::InferCtxtExt as _; use crate::traits::select::IntercrateAmbiguityCause; use crate::traits::util::impl_subject_and_oblig; use crate::traits::SkipLeakCheck; use crate::traits::{ - self, Normalized, Obligation, ObligationCause, PredicateObligation, PredicateObligations, - SelectionContext, + self, Normalized, Obligation, ObligationCause, ObligationCtxt, PredicateObligation, + PredicateObligations, SelectionContext, }; use rustc_data_structures::fx::FxIndexSet; use rustc_errors::Diagnostic; -use rustc_hir::def_id::{DefId, LOCAL_CRATE}; +use rustc_hir::def_id::{DefId, CRATE_DEF_ID, LOCAL_CRATE}; +use rustc_hir::CRATE_HIR_ID; use rustc_infer::infer::{InferCtxt, TyCtxtInferExt}; use rustc_infer::traits::util; use rustc_middle::traits::specialization_graph::OverlapMode; @@ -322,7 +324,7 @@ fn negative_impl<'cx, 'tcx>( let (subject2, obligations) = impl_subject_and_oblig(selcx, impl_env, impl2_def_id, impl2_substs); - !equate(&infcx, impl_env, subject1, subject2, obligations) + !equate(&infcx, impl_env, subject1, subject2, obligations, impl1_def_id) }) } @@ -332,6 +334,7 @@ fn equate<'cx, 'tcx>( subject1: ImplSubject<'tcx>, subject2: ImplSubject<'tcx>, obligations: impl Iterator>, + body_def_id: DefId, ) -> bool { // do the impls unify? If not, not disjoint. let Ok(InferOk { obligations: more_obligations, .. }) = @@ -342,8 +345,10 @@ fn equate<'cx, 'tcx>( }; let selcx = &mut SelectionContext::new(&infcx); - let opt_failing_obligation = - obligations.into_iter().chain(more_obligations).find(|o| negative_impl_exists(selcx, o)); + let opt_failing_obligation = obligations + .into_iter() + .chain(more_obligations) + .find(|o| negative_impl_exists(selcx, o, body_def_id)); if let Some(failing_obligation) = opt_failing_obligation { debug!("overlap: obligation unsatisfiable {:?}", failing_obligation); @@ -358,14 +363,15 @@ fn equate<'cx, 'tcx>( fn negative_impl_exists<'cx, 'tcx>( selcx: &SelectionContext<'cx, 'tcx>, o: &PredicateObligation<'tcx>, + body_def_id: DefId, ) -> bool { - if resolve_negative_obligation(selcx.infcx().fork(), o) { + if resolve_negative_obligation(selcx.infcx().fork(), o, body_def_id) { return true; } // Try to prove a negative obligation exists for super predicates for o in util::elaborate_predicates(selcx.tcx(), iter::once(o.predicate)) { - if resolve_negative_obligation(selcx.infcx().fork(), &o) { + if resolve_negative_obligation(selcx.infcx().fork(), &o, body_def_id) { return true; } } @@ -377,6 +383,7 @@ fn negative_impl_exists<'cx, 'tcx>( fn resolve_negative_obligation<'cx, 'tcx>( infcx: InferCtxt<'cx, 'tcx>, o: &PredicateObligation<'tcx>, + body_def_id: DefId, ) -> bool { let tcx = infcx.tcx; @@ -385,12 +392,24 @@ fn resolve_negative_obligation<'cx, 'tcx>( }; let param_env = o.param_env; - let errors = super::fully_solve_obligation(&infcx, o); - if !errors.is_empty() { + if !super::fully_solve_obligation(&infcx, o).is_empty() { return false; } - let outlives_env = OutlivesEnvironment::new(param_env); + let (body_id, body_def_id) = if let Some(body_def_id) = body_def_id.as_local() { + (tcx.hir().local_def_id_to_hir_id(body_def_id), body_def_id) + } else { + (CRATE_HIR_ID, CRATE_DEF_ID) + }; + + let ocx = ObligationCtxt::new(&infcx); + let wf_tys = ocx.assumed_wf_types(param_env, DUMMY_SP, body_def_id); + let outlives_env = OutlivesEnvironment::with_bounds( + param_env, + Some(&infcx), + infcx.implied_bounds_tys(param_env, body_id, wf_tys), + ); + infcx.process_registered_region_obligations(outlives_env.region_bound_pairs(), param_env); infcx.resolve_regions(&outlives_env).is_empty() diff --git a/compiler/rustc_trait_selection/src/traits/mod.rs b/compiler/rustc_trait_selection/src/traits/mod.rs index d922f893321..904c81f9215 100644 --- a/compiler/rustc_trait_selection/src/traits/mod.rs +++ b/compiler/rustc_trait_selection/src/traits/mod.rs @@ -13,6 +13,7 @@ mod fulfill; pub mod misc; mod object_safety; mod on_unimplemented; +pub mod outlives_bounds; mod project; pub mod query; pub(crate) mod relationships; diff --git a/compiler/rustc_typeck/src/outlives/outlives_bounds.rs b/compiler/rustc_trait_selection/src/traits/outlives_bounds.rs similarity index 93% rename from compiler/rustc_typeck/src/outlives/outlives_bounds.rs rename to compiler/rustc_trait_selection/src/traits/outlives_bounds.rs index 024e20d9223..a4b54018228 100644 --- a/compiler/rustc_typeck/src/outlives/outlives_bounds.rs +++ b/compiler/rustc_trait_selection/src/traits/outlives_bounds.rs @@ -1,11 +1,11 @@ +use crate::infer::InferCtxt; +use crate::traits::query::type_op::{self, TypeOp, TypeOpOutput}; +use crate::traits::query::NoSolution; +use crate::traits::{ObligationCause, TraitEngine, TraitEngineExt}; use rustc_data_structures::fx::FxHashSet; use rustc_hir as hir; use rustc_hir::HirId; use rustc_middle::ty::{self, ParamEnv, Ty}; -use rustc_trait_selection::infer::InferCtxt; -use rustc_trait_selection::traits::query::type_op::{self, TypeOp, TypeOpOutput}; -use rustc_trait_selection::traits::query::NoSolution; -use rustc_trait_selection::traits::{ObligationCause, TraitEngine, TraitEngineExt}; pub use rustc_middle::traits::query::OutlivesBound; diff --git a/compiler/rustc_typeck/src/check/compare_method.rs b/compiler/rustc_typeck/src/check/compare_method.rs index df171c2531a..804306814a2 100644 --- a/compiler/rustc_typeck/src/check/compare_method.rs +++ b/compiler/rustc_typeck/src/check/compare_method.rs @@ -1,6 +1,5 @@ use super::potentially_plural_count; use crate::errors::LifetimesOrBoundsMismatchOnTrait; -use crate::outlives::outlives_bounds::InferCtxtExt as _; use rustc_data_structures::fx::FxHashSet; use rustc_errors::{pluralize, struct_span_err, Applicability, DiagnosticId, ErrorGuaranteed}; use rustc_hir as hir; @@ -17,6 +16,7 @@ use rustc_middle::ty::{self, DefIdTree}; use rustc_middle::ty::{GenericParamDefKind, ToPredicate, TyCtxt}; use rustc_span::Span; use rustc_trait_selection::traits::error_reporting::InferCtxtExt; +use rustc_trait_selection::traits::outlives_bounds::InferCtxtExt as _; use rustc_trait_selection::traits::{ self, ObligationCause, ObligationCauseCode, ObligationCtxt, Reveal, }; diff --git a/compiler/rustc_typeck/src/check/wfcheck.rs b/compiler/rustc_typeck/src/check/wfcheck.rs index e8243d666b6..ce42647c837 100644 --- a/compiler/rustc_typeck/src/check/wfcheck.rs +++ b/compiler/rustc_typeck/src/check/wfcheck.rs @@ -1,5 +1,4 @@ use crate::constrained_generic_params::{identify_constrained_generic_params, Parameter}; -use crate::outlives::outlives_bounds::InferCtxtExt as _; use rustc_ast as ast; use rustc_data_structures::fx::{FxHashMap, FxHashSet}; use rustc_errors::{pluralize, struct_span_err, Applicability, DiagnosticBuilder, ErrorGuaranteed}; @@ -22,6 +21,7 @@ use rustc_span::symbol::{sym, Ident, Symbol}; use rustc_span::{Span, DUMMY_SP}; use rustc_trait_selection::autoderef::Autoderef; use rustc_trait_selection::traits::error_reporting::InferCtxtExt; +use rustc_trait_selection::traits::outlives_bounds::InferCtxtExt as _; use rustc_trait_selection::traits::query::evaluate_obligation::InferCtxtExt as _; use rustc_trait_selection::traits::{ self, ObligationCause, ObligationCauseCode, ObligationCtxt, WellFormedLoc, diff --git a/compiler/rustc_typeck/src/impl_wf_check/min_specialization.rs b/compiler/rustc_typeck/src/impl_wf_check/min_specialization.rs index 6240024d49c..2741d9f776c 100644 --- a/compiler/rustc_typeck/src/impl_wf_check/min_specialization.rs +++ b/compiler/rustc_typeck/src/impl_wf_check/min_specialization.rs @@ -67,7 +67,6 @@ use crate::constrained_generic_params as cgp; use crate::errors::SubstsOnOverriddenImpl; -use crate::outlives::outlives_bounds::InferCtxtExt as _; use rustc_data_structures::fx::FxHashSet; use rustc_hir::def_id::{DefId, LocalDefId}; @@ -79,6 +78,7 @@ use rustc_middle::ty::trait_def::TraitSpecializationKind; use rustc_middle::ty::{self, TyCtxt, TypeVisitable}; use rustc_span::Span; use rustc_trait_selection::traits::error_reporting::InferCtxtExt; +use rustc_trait_selection::traits::outlives_bounds::InferCtxtExt as _; use rustc_trait_selection::traits::{self, translate_substs, wf, ObligationCtxt}; pub(super) fn check_min_specialization(tcx: TyCtxt<'_>, impl_def_id: LocalDefId) { diff --git a/compiler/rustc_typeck/src/outlives/mod.rs b/compiler/rustc_typeck/src/outlives/mod.rs index 8fa65d51e3b..e50c267659e 100644 --- a/compiler/rustc_typeck/src/outlives/mod.rs +++ b/compiler/rustc_typeck/src/outlives/mod.rs @@ -9,7 +9,6 @@ use rustc_span::Span; mod explicit; mod implicit_infer; -pub(crate) mod outlives_bounds; /// Code to write unit test for outlives. pub mod test; mod utils; diff --git a/library/alloc/src/macros.rs b/library/alloc/src/macros.rs index 88eb6aa7a83..5198bf297d9 100644 --- a/library/alloc/src/macros.rs +++ b/library/alloc/src/macros.rs @@ -107,6 +107,8 @@ macro_rules! vec { /// format!("test"); /// format!("hello {}", "world!"); /// format!("x = {}, y = {y}", 10, y = 30); +/// let (x, y) = (1, 2); +/// format!("{x} + {y} = 3"); /// ``` #[macro_export] #[stable(feature = "rust1", since = "1.0.0")] diff --git a/library/core/src/iter/adapters/by_ref_sized.rs b/library/core/src/iter/adapters/by_ref_sized.rs index cc1e8e8a27f..477e7117c3e 100644 --- a/library/core/src/iter/adapters/by_ref_sized.rs +++ b/library/core/src/iter/adapters/by_ref_sized.rs @@ -1,4 +1,4 @@ -use crate::ops::Try; +use crate::ops::{NeverShortCircuit, Try}; /// Like `Iterator::by_ref`, but requiring `Sized` so it can forward generics. /// @@ -8,28 +8,31 @@ use crate::ops::Try; #[derive(Debug)] pub struct ByRefSized<'a, I>(pub &'a mut I); +// The following implementations use UFCS-style, rather than trusting autoderef, +// to avoid accidentally calling the `&mut Iterator` implementations. + #[unstable(feature = "std_internals", issue = "none")] impl Iterator for ByRefSized<'_, I> { type Item = I::Item; #[inline] fn next(&mut self) -> Option { - self.0.next() + I::next(self.0) } #[inline] fn size_hint(&self) -> (usize, Option) { - self.0.size_hint() + I::size_hint(self.0) } #[inline] fn advance_by(&mut self, n: usize) -> Result<(), usize> { - self.0.advance_by(n) + I::advance_by(self.0, n) } #[inline] fn nth(&mut self, n: usize) -> Option { - self.0.nth(n) + I::nth(self.0, n) } #[inline] @@ -37,7 +40,8 @@ impl Iterator for ByRefSized<'_, I> { where F: FnMut(B, Self::Item) -> B, { - self.0.fold(init, f) + // `fold` needs ownership, so this can't forward directly. + I::try_fold(self.0, init, NeverShortCircuit::wrap_mut_2(f)).0 } #[inline] @@ -46,7 +50,7 @@ impl Iterator for ByRefSized<'_, I> { F: FnMut(B, Self::Item) -> R, R: Try, { - self.0.try_fold(init, f) + I::try_fold(self.0, init, f) } } @@ -54,17 +58,17 @@ impl Iterator for ByRefSized<'_, I> { impl DoubleEndedIterator for ByRefSized<'_, I> { #[inline] fn next_back(&mut self) -> Option { - self.0.next_back() + I::next_back(self.0) } #[inline] fn advance_back_by(&mut self, n: usize) -> Result<(), usize> { - self.0.advance_back_by(n) + I::advance_back_by(self.0, n) } #[inline] fn nth_back(&mut self, n: usize) -> Option { - self.0.nth_back(n) + I::nth_back(self.0, n) } #[inline] @@ -72,7 +76,8 @@ impl DoubleEndedIterator for ByRefSized<'_, I> { where F: FnMut(B, Self::Item) -> B, { - self.0.rfold(init, f) + // `rfold` needs ownership, so this can't forward directly. + I::try_rfold(self.0, init, NeverShortCircuit::wrap_mut_2(f)).0 } #[inline] @@ -81,6 +86,6 @@ impl DoubleEndedIterator for ByRefSized<'_, I> { F: FnMut(B, Self::Item) -> R, R: Try, { - self.0.try_rfold(init, f) + I::try_rfold(self.0, init, f) } } diff --git a/library/core/src/marker.rs b/library/core/src/marker.rs index 2c57897956f..ab673c623b5 100644 --- a/library/core/src/marker.rs +++ b/library/core/src/marker.rs @@ -343,7 +343,7 @@ pub trait StructuralEq { /// If you try to implement `Copy` on a struct or enum containing non-`Copy` data, you will get /// the error [E0204]. /// -/// [E0204]: ../../error-index.html#E0204 +/// [E0204]: ../../error_codes/E0204.html /// /// ## When *should* my type be `Copy`? /// diff --git a/library/core/src/ops/drop.rs b/library/core/src/ops/drop.rs index aa654aa5570..de9ddb852df 100644 --- a/library/core/src/ops/drop.rs +++ b/library/core/src/ops/drop.rs @@ -156,7 +156,7 @@ pub trait Drop { /// handled by the compiler, but when using unsafe code, can sometimes occur /// unintentionally, particularly when using [`ptr::drop_in_place`]. /// - /// [E0040]: ../../error-index.html#E0040 + /// [E0040]: ../../error_codes/E0040.html /// [`panic!`]: crate::panic! /// [`mem::drop`]: drop /// [`ptr::drop_in_place`]: crate::ptr::drop_in_place diff --git a/library/core/tests/iter/adapters/by_ref_sized.rs b/library/core/tests/iter/adapters/by_ref_sized.rs new file mode 100644 index 00000000000..a9c066f0e8c --- /dev/null +++ b/library/core/tests/iter/adapters/by_ref_sized.rs @@ -0,0 +1,20 @@ +use core::iter::*; + +#[test] +fn test_iterator_by_ref_sized() { + let a = ['a', 'b', 'c', 'd']; + + let mut s = String::from("Z"); + let mut it = a.iter().copied(); + ByRefSized(&mut it).take(2).for_each(|x| s.push(x)); + assert_eq!(s, "Zab"); + ByRefSized(&mut it).fold((), |(), x| s.push(x)); + assert_eq!(s, "Zabcd"); + + let mut s = String::from("Z"); + let mut it = a.iter().copied(); + ByRefSized(&mut it).rev().take(2).for_each(|x| s.push(x)); + assert_eq!(s, "Zdc"); + ByRefSized(&mut it).rfold((), |(), x| s.push(x)); + assert_eq!(s, "Zdcba"); +} diff --git a/library/core/tests/iter/adapters/mod.rs b/library/core/tests/iter/adapters/mod.rs index 96539c0c394..ffd5f3857ae 100644 --- a/library/core/tests/iter/adapters/mod.rs +++ b/library/core/tests/iter/adapters/mod.rs @@ -1,4 +1,5 @@ mod array_chunks; +mod by_ref_sized; mod chain; mod cloned; mod copied; diff --git a/library/std/src/macros.rs b/library/std/src/macros.rs index 0cb21ef53b1..ce2a979475c 100644 --- a/library/std/src/macros.rs +++ b/library/std/src/macros.rs @@ -93,6 +93,8 @@ macro_rules! print { /// println!(); // prints just a newline /// println!("hello there!"); /// println!("format {} arguments", "some"); +/// let local_variable = "some"; +/// println!("format {local_variable} arguments"); /// ``` #[macro_export] #[stable(feature = "rust1", since = "1.0.0")] diff --git a/src/ci/docker/run.sh b/src/ci/docker/run.sh index 93b4f435d4d..69d4916e5a9 100755 --- a/src/ci/docker/run.sh +++ b/src/ci/docker/run.sh @@ -213,7 +213,16 @@ else args="$args --volume $HOME/.cargo:/cargo" args="$args --volume $HOME/rustsrc:$HOME/rustsrc" args="$args --volume /tmp/toolstate:/tmp/toolstate" - args="$args --env LOCAL_USER_ID=`id -u`" + + id=$(id -u) + if [[ "$id" != 0 && "$(docker -v)" =~ ^podman ]]; then + # Rootless podman creates a separate user namespace, where an inner + # LOCAL_USER_ID will map to a different subuid range on the host. + # The "keep-id" mode maps the current UID directly into the container. + args="$args --env NO_CHANGE_USER=1 --userns=keep-id" + else + args="$args --env LOCAL_USER_ID=$id" + fi fi if [ "$dev" = "1" ] diff --git a/src/librustdoc/html/static/css/rustdoc.css b/src/librustdoc/html/static/css/rustdoc.css index b1fa5e7d86d..f1cd3defbef 100644 --- a/src/librustdoc/html/static/css/rustdoc.css +++ b/src/librustdoc/html/static/css/rustdoc.css @@ -745,10 +745,6 @@ pre, .rustdoc.source .example-wrap { border: 1px solid var(--border-color); } -.fields + table { - margin-bottom: 1em; -} - .content .item-list { list-style-type: none; padding: 0; diff --git a/src/test/run-make-fulldeps/a-b-a-linker-guard/Makefile b/src/test/run-make-fulldeps/a-b-a-linker-guard/Makefile index 4a9b3d70933..adc9e3d0916 100644 --- a/src/test/run-make-fulldeps/a-b-a-linker-guard/Makefile +++ b/src/test/run-make-fulldeps/a-b-a-linker-guard/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk # Test that if we build `b` against a version of `a` that has one set # of types, it will not run with a dylib that has a different set of diff --git a/src/test/run-make-fulldeps/alloc-no-oom-handling/Makefile b/src/test/run-make-fulldeps/alloc-no-oom-handling/Makefile index eb6ad9bd1a7..735d91bd27c 100644 --- a/src/test/run-make-fulldeps/alloc-no-oom-handling/Makefile +++ b/src/test/run-make-fulldeps/alloc-no-oom-handling/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk all: $(RUSTC) --edition=2021 -Dwarnings --crate-type=rlib ../../../../library/alloc/src/lib.rs --cfg no_global_oom_handling diff --git a/src/test/run-make-fulldeps/allow-non-lint-warnings-cmdline/Makefile b/src/test/run-make-fulldeps/allow-non-lint-warnings-cmdline/Makefile index c14006cc2e0..60d9c7c3745 100644 --- a/src/test/run-make-fulldeps/allow-non-lint-warnings-cmdline/Makefile +++ b/src/test/run-make-fulldeps/allow-non-lint-warnings-cmdline/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk # Test that -A warnings makes the 'empty trait list for derive' warning go away OUT=$(shell $(RUSTC) foo.rs -A warnings 2>&1 | grep "warning" ) diff --git a/src/test/run-make-fulldeps/allow-warnings-cmdline-stability/Makefile b/src/test/run-make-fulldeps/allow-warnings-cmdline-stability/Makefile index 3eecaf93142..1ce8d0ec284 100644 --- a/src/test/run-make-fulldeps/allow-warnings-cmdline-stability/Makefile +++ b/src/test/run-make-fulldeps/allow-warnings-cmdline-stability/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk # Test that -A warnings makes the 'empty trait list for derive' warning go away DEP=$(shell $(RUSTC) bar.rs) diff --git a/src/test/run-make-fulldeps/archive-duplicate-names/Makefile b/src/test/run-make-fulldeps/archive-duplicate-names/Makefile index 93711c41d79..bbdcd2a34fe 100644 --- a/src/test/run-make-fulldeps/archive-duplicate-names/Makefile +++ b/src/test/run-make-fulldeps/archive-duplicate-names/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk all: mkdir $(TMPDIR)/a diff --git a/src/test/run-make-fulldeps/arguments-non-c-like-enum/Makefile b/src/test/run-make-fulldeps/arguments-non-c-like-enum/Makefile index 5b5d620efe6..513311c8289 100644 --- a/src/test/run-make-fulldeps/arguments-non-c-like-enum/Makefile +++ b/src/test/run-make-fulldeps/arguments-non-c-like-enum/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk all: $(RUSTC) --crate-type=staticlib nonclike.rs diff --git a/src/test/run-make-fulldeps/atomic-lock-free/Makefile b/src/test/run-make-fulldeps/atomic-lock-free/Makefile index 9e8b4fabf17..37e59624a25 100644 --- a/src/test/run-make-fulldeps/atomic-lock-free/Makefile +++ b/src/test/run-make-fulldeps/atomic-lock-free/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk # This tests ensure that atomic types are never lowered into runtime library calls that are not # guaranteed to be lock-free. diff --git a/src/test/run-make-fulldeps/bare-outfile/Makefile b/src/test/run-make-fulldeps/bare-outfile/Makefile index baa4c1c0237..858466e942b 100644 --- a/src/test/run-make-fulldeps/bare-outfile/Makefile +++ b/src/test/run-make-fulldeps/bare-outfile/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk all: cp foo.rs $(TMPDIR) diff --git a/src/test/run-make-fulldeps/c-dynamic-dylib/Makefile b/src/test/run-make-fulldeps/c-dynamic-dylib/Makefile index c524610bf5c..ac68778922d 100644 --- a/src/test/run-make-fulldeps/c-dynamic-dylib/Makefile +++ b/src/test/run-make-fulldeps/c-dynamic-dylib/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk # ignore-macos # diff --git a/src/test/run-make-fulldeps/c-dynamic-rlib/Makefile b/src/test/run-make-fulldeps/c-dynamic-rlib/Makefile index 91343e73e15..c65d648b929 100644 --- a/src/test/run-make-fulldeps/c-dynamic-rlib/Makefile +++ b/src/test/run-make-fulldeps/c-dynamic-rlib/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk # ignore-macos # diff --git a/src/test/run-make-fulldeps/c-link-to-rust-dylib/Makefile b/src/test/run-make-fulldeps/c-link-to-rust-dylib/Makefile index 98e112a3744..2a371b54541 100644 --- a/src/test/run-make-fulldeps/c-link-to-rust-dylib/Makefile +++ b/src/test/run-make-fulldeps/c-link-to-rust-dylib/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk all: $(TMPDIR)/$(call BIN,bar) $(call RUN,bar) diff --git a/src/test/run-make-fulldeps/c-link-to-rust-staticlib/Makefile b/src/test/run-make-fulldeps/c-link-to-rust-staticlib/Makefile index 687b59ac00e..d38bcef309a 100644 --- a/src/test/run-make-fulldeps/c-link-to-rust-staticlib/Makefile +++ b/src/test/run-make-fulldeps/c-link-to-rust-staticlib/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk # ignore-freebsd # FIXME diff --git a/src/test/run-make-fulldeps/c-link-to-rust-va-list-fn/Makefile b/src/test/run-make-fulldeps/c-link-to-rust-va-list-fn/Makefile index f124ca2ab61..9ce2a34e677 100644 --- a/src/test/run-make-fulldeps/c-link-to-rust-va-list-fn/Makefile +++ b/src/test/run-make-fulldeps/c-link-to-rust-va-list-fn/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk all: $(RUSTC) checkrust.rs diff --git a/src/test/run-make-fulldeps/c-static-dylib/Makefile b/src/test/run-make-fulldeps/c-static-dylib/Makefile index f88786857cc..5b78005e3ee 100644 --- a/src/test/run-make-fulldeps/c-static-dylib/Makefile +++ b/src/test/run-make-fulldeps/c-static-dylib/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk all: $(call NATIVE_STATICLIB,cfoo) $(RUSTC) foo.rs -C prefer-dynamic diff --git a/src/test/run-make-fulldeps/c-static-rlib/Makefile b/src/test/run-make-fulldeps/c-static-rlib/Makefile index be22b2728f0..11a3cf1940c 100644 --- a/src/test/run-make-fulldeps/c-static-rlib/Makefile +++ b/src/test/run-make-fulldeps/c-static-rlib/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk all: $(call NATIVE_STATICLIB,cfoo) $(RUSTC) foo.rs diff --git a/src/test/run-make-fulldeps/c-unwind-abi-catch-lib-panic/Makefile b/src/test/run-make-fulldeps/c-unwind-abi-catch-lib-panic/Makefile index a8515c533af..134f000d453 100644 --- a/src/test/run-make-fulldeps/c-unwind-abi-catch-lib-panic/Makefile +++ b/src/test/run-make-fulldeps/c-unwind-abi-catch-lib-panic/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk all: archive # Compile `main.rs`, which will link into our library, and run it. diff --git a/src/test/run-make-fulldeps/c-unwind-abi-catch-panic/Makefile b/src/test/run-make-fulldeps/c-unwind-abi-catch-panic/Makefile index 9553b7aeeb9..e93ec99da2a 100644 --- a/src/test/run-make-fulldeps/c-unwind-abi-catch-panic/Makefile +++ b/src/test/run-make-fulldeps/c-unwind-abi-catch-panic/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk all: $(call NATIVE_STATICLIB,add) $(RUSTC) main.rs diff --git a/src/test/run-make-fulldeps/cat-and-grep-sanity-check/Makefile b/src/test/run-make-fulldeps/cat-and-grep-sanity-check/Makefile index fead197ce39..82351e22009 100644 --- a/src/test/run-make-fulldeps/cat-and-grep-sanity-check/Makefile +++ b/src/test/run-make-fulldeps/cat-and-grep-sanity-check/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk all: echo a | $(CGREP) a diff --git a/src/test/run-make-fulldeps/cdylib-fewer-symbols/Makefile b/src/test/run-make-fulldeps/cdylib-fewer-symbols/Makefile index 23491d814d0..324791af8de 100644 --- a/src/test/run-make-fulldeps/cdylib-fewer-symbols/Makefile +++ b/src/test/run-make-fulldeps/cdylib-fewer-symbols/Makefile @@ -1,7 +1,7 @@ # Test that allocator-related symbols don't show up as exported from a cdylib as # they're internal to Rust and not part of the public ABI. --include ../tools.mk +include ../tools.mk # ignore-windows # FIXME: The __rdl_ and __rust_ symbol still remains, no matter using MSVC or GNU diff --git a/src/test/run-make-fulldeps/codegen-options-parsing/Makefile b/src/test/run-make-fulldeps/codegen-options-parsing/Makefile index f1410b69b3f..b063593c9d9 100644 --- a/src/test/run-make-fulldeps/codegen-options-parsing/Makefile +++ b/src/test/run-make-fulldeps/codegen-options-parsing/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk all: #Option taking a number diff --git a/src/test/run-make-fulldeps/compile-stdin/Makefile b/src/test/run-make-fulldeps/compile-stdin/Makefile index 1442224cf9a..be15548690f 100644 --- a/src/test/run-make-fulldeps/compile-stdin/Makefile +++ b/src/test/run-make-fulldeps/compile-stdin/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk all: echo 'fn main(){}' | $(RUSTC) - diff --git a/src/test/run-make-fulldeps/compiler-lookup-paths-2/Makefile b/src/test/run-make-fulldeps/compiler-lookup-paths-2/Makefile index bd7f62d5c2d..d4ff7d8daab 100644 --- a/src/test/run-make-fulldeps/compiler-lookup-paths-2/Makefile +++ b/src/test/run-make-fulldeps/compiler-lookup-paths-2/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk all: mkdir -p $(TMPDIR)/a $(TMPDIR)/b diff --git a/src/test/run-make-fulldeps/compiler-lookup-paths/Makefile b/src/test/run-make-fulldeps/compiler-lookup-paths/Makefile index e22b937a087..c16bf7af6c4 100644 --- a/src/test/run-make-fulldeps/compiler-lookup-paths/Makefile +++ b/src/test/run-make-fulldeps/compiler-lookup-paths/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk all: $(TMPDIR)/libnative.a mkdir -p $(TMPDIR)/crate diff --git a/src/test/run-make-fulldeps/compiler-rt-works-on-mingw/Makefile b/src/test/run-make-fulldeps/compiler-rt-works-on-mingw/Makefile index 0cf5d185521..74917570a01 100644 --- a/src/test/run-make-fulldeps/compiler-rt-works-on-mingw/Makefile +++ b/src/test/run-make-fulldeps/compiler-rt-works-on-mingw/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk # only-windows-gnu diff --git a/src/test/run-make-fulldeps/core-no-fp-fmt-parse/Makefile b/src/test/run-make-fulldeps/core-no-fp-fmt-parse/Makefile index f79e4c3f479..d083aaa6620 100644 --- a/src/test/run-make-fulldeps/core-no-fp-fmt-parse/Makefile +++ b/src/test/run-make-fulldeps/core-no-fp-fmt-parse/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk all: $(RUSTC) --edition=2021 --crate-type=rlib ../../../../library/core/src/lib.rs --cfg no_fp_fmt_parse diff --git a/src/test/run-make-fulldeps/crate-data-smoke/Makefile b/src/test/run-make-fulldeps/crate-data-smoke/Makefile index 1afda457411..a453f65ff3e 100644 --- a/src/test/run-make-fulldeps/crate-data-smoke/Makefile +++ b/src/test/run-make-fulldeps/crate-data-smoke/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk all: [ `$(RUSTC) --print crate-name crate.rs` = "foo" ] diff --git a/src/test/run-make-fulldeps/crate-hash-rustc-version/Makefile b/src/test/run-make-fulldeps/crate-hash-rustc-version/Makefile index 091508cd805..4f25a865ebd 100644 --- a/src/test/run-make-fulldeps/crate-hash-rustc-version/Makefile +++ b/src/test/run-make-fulldeps/crate-hash-rustc-version/Makefile @@ -1,4 +1,4 @@ --include ../../run-make-fulldeps/tools.mk +include ../../run-make-fulldeps/tools.mk # Ensure that crates compiled with different rustc versions cannot # be dynamically linked. diff --git a/src/test/run-make-fulldeps/crate-name-priority/Makefile b/src/test/run-make-fulldeps/crate-name-priority/Makefile index 17ecb33ab28..08a07c325e3 100644 --- a/src/test/run-make-fulldeps/crate-name-priority/Makefile +++ b/src/test/run-make-fulldeps/crate-name-priority/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk all: $(RUSTC) foo.rs diff --git a/src/test/run-make-fulldeps/cross-lang-lto-clang/Makefile b/src/test/run-make-fulldeps/cross-lang-lto-clang/Makefile index 3ca2a8afad0..acaebf439d6 100644 --- a/src/test/run-make-fulldeps/cross-lang-lto-clang/Makefile +++ b/src/test/run-make-fulldeps/cross-lang-lto-clang/Makefile @@ -3,7 +3,7 @@ # This test makes sure that cross-language inlining actually works by checking # the generated machine code. --include ../tools.mk +include ../tools.mk all: cpp-executable rust-executable diff --git a/src/test/run-make-fulldeps/cross-lang-lto-pgo-smoketest/Makefile b/src/test/run-make-fulldeps/cross-lang-lto-pgo-smoketest/Makefile index f8efeca5614..70085d9bde1 100644 --- a/src/test/run-make-fulldeps/cross-lang-lto-pgo-smoketest/Makefile +++ b/src/test/run-make-fulldeps/cross-lang-lto-pgo-smoketest/Makefile @@ -5,7 +5,7 @@ # can be executed without anything crashing. It does not test whether PGO or # xLTO have any specific effect on the generated code. --include ../tools.mk +include ../tools.mk COMMON_FLAGS=-Copt-level=3 -Ccodegen-units=1 diff --git a/src/test/run-make-fulldeps/cross-lang-lto-upstream-rlibs/Makefile b/src/test/run-make-fulldeps/cross-lang-lto-upstream-rlibs/Makefile index f70b411d747..6f1caa31a80 100644 --- a/src/test/run-make-fulldeps/cross-lang-lto-upstream-rlibs/Makefile +++ b/src/test/run-make-fulldeps/cross-lang-lto-upstream-rlibs/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk # ignore windows due to libLLVM being present in PATH and the PATH and library path being the same # (so fixing it is harder). See #57765 for context diff --git a/src/test/run-make-fulldeps/cross-lang-lto/Makefile b/src/test/run-make-fulldeps/cross-lang-lto/Makefile index b4394cb5b40..92058f952a9 100644 --- a/src/test/run-make-fulldeps/cross-lang-lto/Makefile +++ b/src/test/run-make-fulldeps/cross-lang-lto/Makefile @@ -1,5 +1,5 @@ --include ../tools.mk +include ../tools.mk # ignore windows due to libLLVM being present in PATH and the PATH and library path being the same # (so fixing it is harder). See #57765 for context diff --git a/src/test/run-make-fulldeps/debug-assertions/Makefile b/src/test/run-make-fulldeps/debug-assertions/Makefile index 76ada90f1e2..73beb4b03ae 100644 --- a/src/test/run-make-fulldeps/debug-assertions/Makefile +++ b/src/test/run-make-fulldeps/debug-assertions/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk all: $(RUSTC) debug.rs -C debug-assertions=no diff --git a/src/test/run-make-fulldeps/dep-info-doesnt-run-much/Makefile b/src/test/run-make-fulldeps/dep-info-doesnt-run-much/Makefile index 2fd84639f21..b4dc44ad2be 100644 --- a/src/test/run-make-fulldeps/dep-info-doesnt-run-much/Makefile +++ b/src/test/run-make-fulldeps/dep-info-doesnt-run-much/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk all: $(RUSTC) foo.rs --emit dep-info diff --git a/src/test/run-make-fulldeps/dep-info-spaces/Makefile b/src/test/run-make-fulldeps/dep-info-spaces/Makefile index 339a751ff96..0cfe513e490 100644 --- a/src/test/run-make-fulldeps/dep-info-spaces/Makefile +++ b/src/test/run-make-fulldeps/dep-info-spaces/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk # ignore-windows # ignore-freebsd diff --git a/src/test/run-make-fulldeps/dep-info/Makefile b/src/test/run-make-fulldeps/dep-info/Makefile index afb9db177cf..c76f43a8eed 100644 --- a/src/test/run-make-fulldeps/dep-info/Makefile +++ b/src/test/run-make-fulldeps/dep-info/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk # ignore-windows # ignore-freebsd diff --git a/src/test/run-make-fulldeps/dylib-chain/Makefile b/src/test/run-make-fulldeps/dylib-chain/Makefile index a33177197b1..1139822f4ea 100644 --- a/src/test/run-make-fulldeps/dylib-chain/Makefile +++ b/src/test/run-make-fulldeps/dylib-chain/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk all: $(RUSTC) m1.rs -C prefer-dynamic diff --git a/src/test/run-make-fulldeps/emit-stack-sizes/Makefile b/src/test/run-make-fulldeps/emit-stack-sizes/Makefile index d2702894842..f636ebd28f2 100644 --- a/src/test/run-make-fulldeps/emit-stack-sizes/Makefile +++ b/src/test/run-make-fulldeps/emit-stack-sizes/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk # ignore-windows # ignore-macos diff --git a/src/test/run-make-fulldeps/emit/Makefile b/src/test/run-make-fulldeps/emit/Makefile index e0b57107e5b..78e68bd6111 100644 --- a/src/test/run-make-fulldeps/emit/Makefile +++ b/src/test/run-make-fulldeps/emit/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk all: $(RUSTC) -Copt-level=0 --emit=llvm-bc,llvm-ir,asm,obj,link test-24876.rs diff --git a/src/test/run-make-fulldeps/error-found-staticlib-instead-crate/Makefile b/src/test/run-make-fulldeps/error-found-staticlib-instead-crate/Makefile index fef12c4da67..0eae41d720c 100644 --- a/src/test/run-make-fulldeps/error-found-staticlib-instead-crate/Makefile +++ b/src/test/run-make-fulldeps/error-found-staticlib-instead-crate/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk all: $(RUSTC) foo.rs --crate-type staticlib diff --git a/src/test/run-make-fulldeps/error-writing-dependencies/Makefile b/src/test/run-make-fulldeps/error-writing-dependencies/Makefile index cbc96901a38..a5d30a647f8 100644 --- a/src/test/run-make-fulldeps/error-writing-dependencies/Makefile +++ b/src/test/run-make-fulldeps/error-writing-dependencies/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk all: # Let's get a nice error message diff --git a/src/test/run-make-fulldeps/exit-code/Makefile b/src/test/run-make-fulldeps/exit-code/Makefile index 007f19852a6..3ffaafe9065 100644 --- a/src/test/run-make-fulldeps/exit-code/Makefile +++ b/src/test/run-make-fulldeps/exit-code/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk all: $(RUSTC) success.rs; [ $$? -eq 0 ] diff --git a/src/test/run-make-fulldeps/extern-diff-internal-name/Makefile b/src/test/run-make-fulldeps/extern-diff-internal-name/Makefile index b84e930757b..54596c2f029 100644 --- a/src/test/run-make-fulldeps/extern-diff-internal-name/Makefile +++ b/src/test/run-make-fulldeps/extern-diff-internal-name/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk all: $(RUSTC) lib.rs diff --git a/src/test/run-make-fulldeps/extern-flag-disambiguates/Makefile b/src/test/run-make-fulldeps/extern-flag-disambiguates/Makefile index 81930e969a9..a8f142a6402 100644 --- a/src/test/run-make-fulldeps/extern-flag-disambiguates/Makefile +++ b/src/test/run-make-fulldeps/extern-flag-disambiguates/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk # Attempt to build this dependency tree: # diff --git a/src/test/run-make-fulldeps/extern-flag-fun/Makefile b/src/test/run-make-fulldeps/extern-flag-fun/Makefile index 38d1d5bb848..a0b7c15edb9 100644 --- a/src/test/run-make-fulldeps/extern-flag-fun/Makefile +++ b/src/test/run-make-fulldeps/extern-flag-fun/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk all: $(RUSTC) bar.rs --crate-type=rlib diff --git a/src/test/run-make-fulldeps/extern-flag-pathless/Makefile b/src/test/run-make-fulldeps/extern-flag-pathless/Makefile index 4849fc62f4a..0f23815b650 100644 --- a/src/test/run-make-fulldeps/extern-flag-pathless/Makefile +++ b/src/test/run-make-fulldeps/extern-flag-pathless/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk # Test mixing pathless --extern with paths. diff --git a/src/test/run-make-fulldeps/extern-flag-rename-transitive/Makefile b/src/test/run-make-fulldeps/extern-flag-rename-transitive/Makefile index 4354209a722..d16a8e20868 100644 --- a/src/test/run-make-fulldeps/extern-flag-rename-transitive/Makefile +++ b/src/test/run-make-fulldeps/extern-flag-rename-transitive/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk all: $(RUSTC) foo.rs diff --git a/src/test/run-make-fulldeps/extern-fn-generic/Makefile b/src/test/run-make-fulldeps/extern-fn-generic/Makefile index cf897dba1f2..71746fb10cb 100644 --- a/src/test/run-make-fulldeps/extern-fn-generic/Makefile +++ b/src/test/run-make-fulldeps/extern-fn-generic/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk all: $(call NATIVE_STATICLIB,test) $(RUSTC) testcrate.rs diff --git a/src/test/run-make-fulldeps/extern-fn-mangle/Makefile b/src/test/run-make-fulldeps/extern-fn-mangle/Makefile index 042048ec25f..4f5d026f213 100644 --- a/src/test/run-make-fulldeps/extern-fn-mangle/Makefile +++ b/src/test/run-make-fulldeps/extern-fn-mangle/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk all: $(call NATIVE_STATICLIB,test) $(RUSTC) test.rs diff --git a/src/test/run-make-fulldeps/extern-fn-reachable/Makefile b/src/test/run-make-fulldeps/extern-fn-reachable/Makefile index 9231a2b3574..05bdb8d65b7 100644 --- a/src/test/run-make-fulldeps/extern-fn-reachable/Makefile +++ b/src/test/run-make-fulldeps/extern-fn-reachable/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk # ignore-windows-msvc diff --git a/src/test/run-make-fulldeps/extern-fn-struct-passing-abi/Makefile b/src/test/run-make-fulldeps/extern-fn-struct-passing-abi/Makefile index 042048ec25f..4f5d026f213 100644 --- a/src/test/run-make-fulldeps/extern-fn-struct-passing-abi/Makefile +++ b/src/test/run-make-fulldeps/extern-fn-struct-passing-abi/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk all: $(call NATIVE_STATICLIB,test) $(RUSTC) test.rs diff --git a/src/test/run-make-fulldeps/extern-fn-with-extern-types/Makefile b/src/test/run-make-fulldeps/extern-fn-with-extern-types/Makefile index 8977e14c3ad..1fa708950d4 100644 --- a/src/test/run-make-fulldeps/extern-fn-with-extern-types/Makefile +++ b/src/test/run-make-fulldeps/extern-fn-with-extern-types/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk all: $(call NATIVE_STATICLIB,ctest) $(RUSTC) test.rs diff --git a/src/test/run-make-fulldeps/extern-fn-with-packed-struct/Makefile b/src/test/run-make-fulldeps/extern-fn-with-packed-struct/Makefile index 042048ec25f..4f5d026f213 100644 --- a/src/test/run-make-fulldeps/extern-fn-with-packed-struct/Makefile +++ b/src/test/run-make-fulldeps/extern-fn-with-packed-struct/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk all: $(call NATIVE_STATICLIB,test) $(RUSTC) test.rs diff --git a/src/test/run-make-fulldeps/extern-fn-with-union/Makefile b/src/test/run-make-fulldeps/extern-fn-with-union/Makefile index 71a5407e882..40bae923e30 100644 --- a/src/test/run-make-fulldeps/extern-fn-with-union/Makefile +++ b/src/test/run-make-fulldeps/extern-fn-with-union/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk all: $(call NATIVE_STATICLIB,ctest) $(RUSTC) testcrate.rs diff --git a/src/test/run-make-fulldeps/extern-multiple-copies/Makefile b/src/test/run-make-fulldeps/extern-multiple-copies/Makefile index 1631aa806af..00668a6bc88 100644 --- a/src/test/run-make-fulldeps/extern-multiple-copies/Makefile +++ b/src/test/run-make-fulldeps/extern-multiple-copies/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk all: $(RUSTC) foo1.rs diff --git a/src/test/run-make-fulldeps/extern-multiple-copies2/Makefile b/src/test/run-make-fulldeps/extern-multiple-copies2/Makefile index 567d7e78a57..84de2ebf34d 100644 --- a/src/test/run-make-fulldeps/extern-multiple-copies2/Makefile +++ b/src/test/run-make-fulldeps/extern-multiple-copies2/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk all: $(RUSTC) foo1.rs diff --git a/src/test/run-make-fulldeps/extern-overrides-distribution/Makefile b/src/test/run-make-fulldeps/extern-overrides-distribution/Makefile index 7d063a4c83c..c57b062cd5d 100644 --- a/src/test/run-make-fulldeps/extern-overrides-distribution/Makefile +++ b/src/test/run-make-fulldeps/extern-overrides-distribution/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk all: $(RUSTC) libc.rs -Cmetadata=foo diff --git a/src/test/run-make-fulldeps/extra-filename-with-temp-outputs/Makefile b/src/test/run-make-fulldeps/extra-filename-with-temp-outputs/Makefile index e46390a9d0c..470448cf50c 100644 --- a/src/test/run-make-fulldeps/extra-filename-with-temp-outputs/Makefile +++ b/src/test/run-make-fulldeps/extra-filename-with-temp-outputs/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk all: $(RUSTC) -C extra-filename=bar foo.rs -C save-temps diff --git a/src/test/run-make-fulldeps/foreign-double-unwind/Makefile b/src/test/run-make-fulldeps/foreign-double-unwind/Makefile index 27cf4d19ce0..ea2fe9ff881 100644 --- a/src/test/run-make-fulldeps/foreign-double-unwind/Makefile +++ b/src/test/run-make-fulldeps/foreign-double-unwind/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk all: foo $(call RUN,foo) | $(CGREP) -v unreachable diff --git a/src/test/run-make-fulldeps/foreign-exceptions/Makefile b/src/test/run-make-fulldeps/foreign-exceptions/Makefile index 7eba52f3c24..38fe2773df2 100644 --- a/src/test/run-make-fulldeps/foreign-exceptions/Makefile +++ b/src/test/run-make-fulldeps/foreign-exceptions/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk all: foo $(call RUN,foo) diff --git a/src/test/run-make-fulldeps/fpic/Makefile b/src/test/run-make-fulldeps/fpic/Makefile index a3d0190eed6..5986de3666f 100644 --- a/src/test/run-make-fulldeps/fpic/Makefile +++ b/src/test/run-make-fulldeps/fpic/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk # ignore-windows # ignore-macos diff --git a/src/test/run-make-fulldeps/glibc-staticlib-args/Makefile b/src/test/run-make-fulldeps/glibc-staticlib-args/Makefile index ad841ec6101..39e64bacf58 100644 --- a/src/test/run-make-fulldeps/glibc-staticlib-args/Makefile +++ b/src/test/run-make-fulldeps/glibc-staticlib-args/Makefile @@ -1,7 +1,7 @@ # only-gnu # only-linux --include ../tools.mk +include ../tools.mk # This ensures that std::env::args works in a library called from C on glibc Linux. diff --git a/src/test/run-make-fulldeps/hir-tree/Makefile b/src/test/run-make-fulldeps/hir-tree/Makefile index 3412c8ce1f5..b0450ea4bc5 100644 --- a/src/test/run-make-fulldeps/hir-tree/Makefile +++ b/src/test/run-make-fulldeps/hir-tree/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk # Test that hir-tree output doesn't crash and includes # the string constant we would expect to see. diff --git a/src/test/run-make-fulldeps/include_bytes_deps/Makefile b/src/test/run-make-fulldeps/include_bytes_deps/Makefile index f91af88efe1..696dfd207bb 100644 --- a/src/test/run-make-fulldeps/include_bytes_deps/Makefile +++ b/src/test/run-make-fulldeps/include_bytes_deps/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk # ignore-freebsd diff --git a/src/test/run-make-fulldeps/incr-add-rust-src-component/Makefile b/src/test/run-make-fulldeps/incr-add-rust-src-component/Makefile index 371f94715a8..5c1d953cc05 100644 --- a/src/test/run-make-fulldeps/incr-add-rust-src-component/Makefile +++ b/src/test/run-make-fulldeps/incr-add-rust-src-component/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk # rust-lang/rust#70924: Test that if we add rust-src component in between two # incremental compiles, the compiler does not ICE on the second. diff --git a/src/test/run-make-fulldeps/inline-always-many-cgu/Makefile b/src/test/run-make-fulldeps/inline-always-many-cgu/Makefile index 0cab955f644..9945821db28 100644 --- a/src/test/run-make-fulldeps/inline-always-many-cgu/Makefile +++ b/src/test/run-make-fulldeps/inline-always-many-cgu/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk all: $(RUSTC) foo.rs --emit llvm-ir -C codegen-units=2 diff --git a/src/test/run-make-fulldeps/interdependent-c-libraries/Makefile b/src/test/run-make-fulldeps/interdependent-c-libraries/Makefile index 0a50859cdaa..dc5b55a9925 100644 --- a/src/test/run-make-fulldeps/interdependent-c-libraries/Makefile +++ b/src/test/run-make-fulldeps/interdependent-c-libraries/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk # The rust crate foo will link to the native library foo, while the rust crate # bar will link to the native library bar. There is also a dependency between diff --git a/src/test/run-make-fulldeps/intrinsic-unreachable/Makefile b/src/test/run-make-fulldeps/intrinsic-unreachable/Makefile index 2037728568e..3c4dade0f52 100644 --- a/src/test/run-make-fulldeps/intrinsic-unreachable/Makefile +++ b/src/test/run-make-fulldeps/intrinsic-unreachable/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk # ignore-windows-msvc # diff --git a/src/test/run-make-fulldeps/invalid-library/Makefile b/src/test/run-make-fulldeps/invalid-library/Makefile index de463a33014..910d9af7b05 100644 --- a/src/test/run-make-fulldeps/invalid-library/Makefile +++ b/src/test/run-make-fulldeps/invalid-library/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk all: touch $(TMPDIR)/lib.rmeta diff --git a/src/test/run-make-fulldeps/invalid-staticlib/Makefile b/src/test/run-make-fulldeps/invalid-staticlib/Makefile index 3a91902ccce..3f0f74ce3cb 100644 --- a/src/test/run-make-fulldeps/invalid-staticlib/Makefile +++ b/src/test/run-make-fulldeps/invalid-staticlib/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk all: touch $(TMPDIR)/libfoo.a diff --git a/src/test/run-make-fulldeps/issue-11908/Makefile b/src/test/run-make-fulldeps/issue-11908/Makefile index cf6572c27ad..47005537e41 100644 --- a/src/test/run-make-fulldeps/issue-11908/Makefile +++ b/src/test/run-make-fulldeps/issue-11908/Makefile @@ -5,7 +5,7 @@ # and then our aux-built libraries will collide with liburl (they have # the same version listed) --include ../tools.mk +include ../tools.mk all: mkdir $(TMPDIR)/other diff --git a/src/test/run-make-fulldeps/issue-14500/Makefile b/src/test/run-make-fulldeps/issue-14500/Makefile index 0c0e331da1d..52550e57018 100644 --- a/src/test/run-make-fulldeps/issue-14500/Makefile +++ b/src/test/run-make-fulldeps/issue-14500/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk # Test to make sure that reachable extern fns are always available in final # productcs, including when LTO is used. In this test, the `foo` crate has a diff --git a/src/test/run-make-fulldeps/issue-14698/Makefile b/src/test/run-make-fulldeps/issue-14698/Makefile index dbe8317dbc4..a1cfb5abab5 100644 --- a/src/test/run-make-fulldeps/issue-14698/Makefile +++ b/src/test/run-make-fulldeps/issue-14698/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk all: TMP=fake TMPDIR=fake $(RUSTC) foo.rs 2>&1 | $(CGREP) "couldn't create a temp dir:" diff --git a/src/test/run-make-fulldeps/issue-15460/Makefile b/src/test/run-make-fulldeps/issue-15460/Makefile index 846805686a1..1648d0c0c9b 100644 --- a/src/test/run-make-fulldeps/issue-15460/Makefile +++ b/src/test/run-make-fulldeps/issue-15460/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk all: $(call NATIVE_STATICLIB,foo) $(RUSTC) foo.rs -C extra-filename=-383hf8 -C prefer-dynamic diff --git a/src/test/run-make-fulldeps/issue-18943/Makefile b/src/test/run-make-fulldeps/issue-18943/Makefile index bef70a0edaa..fc40d756d6f 100644 --- a/src/test/run-make-fulldeps/issue-18943/Makefile +++ b/src/test/run-make-fulldeps/issue-18943/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk # Regression test for ICE #18943 when compiling as lib diff --git a/src/test/run-make-fulldeps/issue-19371/Makefile b/src/test/run-make-fulldeps/issue-19371/Makefile index 9f3ec78465b..994e50801c8 100644 --- a/src/test/run-make-fulldeps/issue-19371/Makefile +++ b/src/test/run-make-fulldeps/issue-19371/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk # This test ensures that rustc compile_input can be called twice in one task # without causing a panic. diff --git a/src/test/run-make-fulldeps/issue-20626/Makefile b/src/test/run-make-fulldeps/issue-20626/Makefile index 0487b240400..f76f31e794a 100644 --- a/src/test/run-make-fulldeps/issue-20626/Makefile +++ b/src/test/run-make-fulldeps/issue-20626/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk # Test output to be four # The original error only occurred when printing, not when comparing using assert! diff --git a/src/test/run-make-fulldeps/issue-22131/Makefile b/src/test/run-make-fulldeps/issue-22131/Makefile index d76aaf5c146..770f4b04ec3 100644 --- a/src/test/run-make-fulldeps/issue-22131/Makefile +++ b/src/test/run-make-fulldeps/issue-22131/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk all: foo.rs $(RUSTC) --cfg 'feature="bar"' --crate-type lib foo.rs diff --git a/src/test/run-make-fulldeps/issue-24445/Makefile b/src/test/run-make-fulldeps/issue-24445/Makefile index f7ad238af14..2a12226a6c0 100644 --- a/src/test/run-make-fulldeps/issue-24445/Makefile +++ b/src/test/run-make-fulldeps/issue-24445/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk # only-linux diff --git a/src/test/run-make-fulldeps/issue-25581/Makefile b/src/test/run-make-fulldeps/issue-25581/Makefile index 042048ec25f..4f5d026f213 100644 --- a/src/test/run-make-fulldeps/issue-25581/Makefile +++ b/src/test/run-make-fulldeps/issue-25581/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk all: $(call NATIVE_STATICLIB,test) $(RUSTC) test.rs diff --git a/src/test/run-make-fulldeps/issue-26006/Makefile b/src/test/run-make-fulldeps/issue-26006/Makefile index dd023c32ba2..0ff07302002 100644 --- a/src/test/run-make-fulldeps/issue-26006/Makefile +++ b/src/test/run-make-fulldeps/issue-26006/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk # ignore-windows diff --git a/src/test/run-make-fulldeps/issue-26092/Makefile b/src/test/run-make-fulldeps/issue-26092/Makefile index 885f45a0224..96822e7690b 100644 --- a/src/test/run-make-fulldeps/issue-26092/Makefile +++ b/src/test/run-make-fulldeps/issue-26092/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk # This test ensures that rustc does not panic with `-o ""` option. diff --git a/src/test/run-make-fulldeps/issue-28595/Makefile b/src/test/run-make-fulldeps/issue-28595/Makefile index 61e9d0c6547..30a1d9c560a 100644 --- a/src/test/run-make-fulldeps/issue-28595/Makefile +++ b/src/test/run-make-fulldeps/issue-28595/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk all: $(call NATIVE_STATICLIB,a) $(call NATIVE_STATICLIB,b) $(RUSTC) a.rs diff --git a/src/test/run-make-fulldeps/issue-28766/Makefile b/src/test/run-make-fulldeps/issue-28766/Makefile index 1f47ef15b27..96d0bdc2b2a 100644 --- a/src/test/run-make-fulldeps/issue-28766/Makefile +++ b/src/test/run-make-fulldeps/issue-28766/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk all: $(RUSTC) -O foo.rs diff --git a/src/test/run-make-fulldeps/issue-30063/Makefile b/src/test/run-make-fulldeps/issue-30063/Makefile index a76051dc81e..e4ede598f7b 100644 --- a/src/test/run-make-fulldeps/issue-30063/Makefile +++ b/src/test/run-make-fulldeps/issue-30063/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk all: rm -f $(TMPDIR)/foo-output diff --git a/src/test/run-make-fulldeps/issue-33329/Makefile b/src/test/run-make-fulldeps/issue-33329/Makefile index 591e4e3dda3..9c149440d8e 100644 --- a/src/test/run-make-fulldeps/issue-33329/Makefile +++ b/src/test/run-make-fulldeps/issue-33329/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk all: $(RUSTC) --target x86_64_unknown-linux-musl main.rs 2>&1 | $(CGREP) \ diff --git a/src/test/run-make-fulldeps/issue-35164/Makefile b/src/test/run-make-fulldeps/issue-35164/Makefile index a95125c566e..38aa6f1265f 100644 --- a/src/test/run-make-fulldeps/issue-35164/Makefile +++ b/src/test/run-make-fulldeps/issue-35164/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk all: $(RUSTC) main.rs --error-format json 2>&1 | $(CGREP) -e '"byte_start":23\b' '"byte_end":29\b' diff --git a/src/test/run-make-fulldeps/issue-37839/Makefile b/src/test/run-make-fulldeps/issue-37839/Makefile index f17ce537fb8..de50bd71379 100644 --- a/src/test/run-make-fulldeps/issue-37839/Makefile +++ b/src/test/run-make-fulldeps/issue-37839/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk all: $(RUSTC) a.rs && $(RUSTC) b.rs diff --git a/src/test/run-make-fulldeps/issue-37893/Makefile b/src/test/run-make-fulldeps/issue-37893/Makefile index 27b69baf977..33a60830e5d 100644 --- a/src/test/run-make-fulldeps/issue-37893/Makefile +++ b/src/test/run-make-fulldeps/issue-37893/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk all: $(RUSTC) a.rs && $(RUSTC) b.rs && $(RUSTC) c.rs diff --git a/src/test/run-make-fulldeps/issue-38237/Makefile b/src/test/run-make-fulldeps/issue-38237/Makefile index 0a681401b1a..75121d04012 100644 --- a/src/test/run-make-fulldeps/issue-38237/Makefile +++ b/src/test/run-make-fulldeps/issue-38237/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk all: $(RUSTC) foo.rs; $(RUSTC) bar.rs diff --git a/src/test/run-make-fulldeps/issue-40535/Makefile b/src/test/run-make-fulldeps/issue-40535/Makefile index 49db1d43e47..155c8825214 100644 --- a/src/test/run-make-fulldeps/issue-40535/Makefile +++ b/src/test/run-make-fulldeps/issue-40535/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk # The ICE occurred in the following situation: # * `foo` declares `extern crate bar, baz`, depends only on `bar` (forgetting `baz` in `Cargo.toml`) diff --git a/src/test/run-make-fulldeps/issue-46239/Makefile b/src/test/run-make-fulldeps/issue-46239/Makefile index 698a605f7e9..a93ef321298 100644 --- a/src/test/run-make-fulldeps/issue-46239/Makefile +++ b/src/test/run-make-fulldeps/issue-46239/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk all: $(RUSTC) main.rs -C opt-level=1 diff --git a/src/test/run-make-fulldeps/issue-47551/Makefile b/src/test/run-make-fulldeps/issue-47551/Makefile index f4495e6b671..5a6ac725701 100644 --- a/src/test/run-make-fulldeps/issue-47551/Makefile +++ b/src/test/run-make-fulldeps/issue-47551/Makefile @@ -1,7 +1,7 @@ # only-linux # ignore-32bit --include ../tools.mk +include ../tools.mk all: $(RUSTC) eh_frame-terminator.rs diff --git a/src/test/run-make-fulldeps/issue-51671/Makefile b/src/test/run-make-fulldeps/issue-51671/Makefile index ba3d3b71007..1d1d370d382 100644 --- a/src/test/run-make-fulldeps/issue-51671/Makefile +++ b/src/test/run-make-fulldeps/issue-51671/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk # ignore-windows-msvc diff --git a/src/test/run-make-fulldeps/issue-53964/Makefile b/src/test/run-make-fulldeps/issue-53964/Makefile index c56beb52fdd..6bd83021374 100644 --- a/src/test/run-make-fulldeps/issue-53964/Makefile +++ b/src/test/run-make-fulldeps/issue-53964/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk all: $(RUSTC) panic.rs diff --git a/src/test/run-make-fulldeps/issue-64153/Makefile b/src/test/run-make-fulldeps/issue-64153/Makefile index 9c0c3fe6e01..51dc6b53a45 100644 --- a/src/test/run-make-fulldeps/issue-64153/Makefile +++ b/src/test/run-make-fulldeps/issue-64153/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk # `llvm-objdump`'s output looks different on windows than on other platforms. # It should be enough to check on Unix platforms, so: diff --git a/src/test/run-make-fulldeps/issue-68794-textrel-on-minimal-lib/Makefile b/src/test/run-make-fulldeps/issue-68794-textrel-on-minimal-lib/Makefile index 2f16ad32859..13983f4ffe0 100644 --- a/src/test/run-make-fulldeps/issue-68794-textrel-on-minimal-lib/Makefile +++ b/src/test/run-make-fulldeps/issue-68794-textrel-on-minimal-lib/Makefile @@ -6,7 +6,7 @@ # The test links a rust static library into a shared library, and checks that # the linker doesn't have to flag the resulting file as containing TEXTRELs. --include ../tools.mk +include ../tools.mk # only-linux diff --git a/src/test/run-make-fulldeps/issue-69368/Makefile b/src/test/run-make-fulldeps/issue-69368/Makefile index dbb044d8f5d..41770475db0 100644 --- a/src/test/run-make-fulldeps/issue-69368/Makefile +++ b/src/test/run-make-fulldeps/issue-69368/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk # Test that previously triggered a linker failure with root cause # similar to one found in the issue #69368. diff --git a/src/test/run-make-fulldeps/issue-7349/Makefile b/src/test/run-make-fulldeps/issue-7349/Makefile index 9658b99e3b0..dc073b77fe1 100644 --- a/src/test/run-make-fulldeps/issue-7349/Makefile +++ b/src/test/run-make-fulldeps/issue-7349/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk # Test to make sure that inner functions within a polymorphic outer function # don't get re-codegened when the outer function is monomorphized. The test diff --git a/src/test/run-make-fulldeps/issue-84395-lto-embed-bitcode/Makefile b/src/test/run-make-fulldeps/issue-84395-lto-embed-bitcode/Makefile index 157edb20c30..879ce174339 100644 --- a/src/test/run-make-fulldeps/issue-84395-lto-embed-bitcode/Makefile +++ b/src/test/run-make-fulldeps/issue-84395-lto-embed-bitcode/Makefile @@ -3,7 +3,7 @@ # This test makes sure the embed bitcode in elf created with # lto-embed-bitcode=optimized is valid llvm BC module. --include ../../run-make-fulldeps/tools.mk +include ../../run-make-fulldeps/tools.mk all: $(RUSTC) test.rs --target $(TARGET) -Clink-arg=-fuse-ld=lld -Clinker-plugin-lto -Clinker=$(CLANG) -Clink-arg=-Wl,--plugin-opt=-lto-embed-bitcode=optimized -Zemit-thin-lto=no diff --git a/src/test/run-make-fulldeps/issue64319/Makefile b/src/test/run-make-fulldeps/issue64319/Makefile index 5592f5a71ff..ee0d177abc9 100644 --- a/src/test/run-make-fulldeps/issue64319/Makefile +++ b/src/test/run-make-fulldeps/issue64319/Makefile @@ -1,4 +1,4 @@ --include ../../run-make-fulldeps/tools.mk +include ../../run-make-fulldeps/tools.mk # Different optimization levels imply different values for `-Zshare-generics`, # so try out a whole bunch of combinations to make sure everything is compatible diff --git a/src/test/run-make-fulldeps/issues-41478-43796/Makefile b/src/test/run-make-fulldeps/issues-41478-43796/Makefile index f9735253ab6..e451cb03126 100644 --- a/src/test/run-make-fulldeps/issues-41478-43796/Makefile +++ b/src/test/run-make-fulldeps/issues-41478-43796/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk all: # Work in /tmp, because we need to create the `save-analysis-temp` folder. diff --git a/src/test/run-make-fulldeps/libs-through-symlinks/Makefile b/src/test/run-make-fulldeps/libs-through-symlinks/Makefile index 8be2e234fea..45deaecb840 100644 --- a/src/test/run-make-fulldeps/libs-through-symlinks/Makefile +++ b/src/test/run-make-fulldeps/libs-through-symlinks/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk # ignore-windows diff --git a/src/test/run-make-fulldeps/libtest-json/Makefile b/src/test/run-make-fulldeps/libtest-json/Makefile index 67b5fc2ed32..37b6cb9e2d4 100644 --- a/src/test/run-make-fulldeps/libtest-json/Makefile +++ b/src/test/run-make-fulldeps/libtest-json/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk # Test expected libtest's JSON output diff --git a/src/test/run-make-fulldeps/link-arg/Makefile b/src/test/run-make-fulldeps/link-arg/Makefile index 0360ede7625..103527c3e14 100644 --- a/src/test/run-make-fulldeps/link-arg/Makefile +++ b/src/test/run-make-fulldeps/link-arg/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk RUSTC_FLAGS = -C link-arg="-lfoo" -C link-arg="-lbar" --print link-args all: diff --git a/src/test/run-make-fulldeps/link-args-order/Makefile b/src/test/run-make-fulldeps/link-args-order/Makefile index f94e882ccb6..c562cc1b396 100644 --- a/src/test/run-make-fulldeps/link-args-order/Makefile +++ b/src/test/run-make-fulldeps/link-args-order/Makefile @@ -1,6 +1,6 @@ # ignore-msvc --include ../tools.mk +include ../tools.mk RUSTC_FLAGS = -C linker-flavor=ld -C link-arg=a -C link-args="b c" -C link-args="d e" -C link-arg=f RUSTC_FLAGS_PRE = -C linker-flavor=ld -Z pre-link-arg=a -Z pre-link-args="b c" -Z pre-link-args="d e" -Z pre-link-arg=f diff --git a/src/test/run-make-fulldeps/link-cfg/Makefile b/src/test/run-make-fulldeps/link-cfg/Makefile index 2701b4a593c..0b25ccded06 100644 --- a/src/test/run-make-fulldeps/link-cfg/Makefile +++ b/src/test/run-make-fulldeps/link-cfg/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk all: $(call DYLIB,return1) $(call DYLIB,return2) $(call NATIVE_STATICLIB,return3) ls $(TMPDIR) diff --git a/src/test/run-make-fulldeps/link-dedup/Makefile b/src/test/run-make-fulldeps/link-dedup/Makefile index 4e7ce0f02d4..5c960335298 100644 --- a/src/test/run-make-fulldeps/link-dedup/Makefile +++ b/src/test/run-make-fulldeps/link-dedup/Makefile @@ -1,6 +1,6 @@ # ignore-msvc --include ../tools.mk +include ../tools.mk all: $(RUSTC) depa.rs diff --git a/src/test/run-make-fulldeps/link-path-order/Makefile b/src/test/run-make-fulldeps/link-path-order/Makefile index eeea0e3714e..ed7c299e61a 100644 --- a/src/test/run-make-fulldeps/link-path-order/Makefile +++ b/src/test/run-make-fulldeps/link-path-order/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk # Verifies that the -L arguments given to the linker is in the same order # as the -L arguments on the rustc command line. diff --git a/src/test/run-make-fulldeps/linkage-attr-on-static/Makefile b/src/test/run-make-fulldeps/linkage-attr-on-static/Makefile index 4befbe14465..7cc54e40a3a 100644 --- a/src/test/run-make-fulldeps/linkage-attr-on-static/Makefile +++ b/src/test/run-make-fulldeps/linkage-attr-on-static/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk all: $(call NATIVE_STATICLIB,foo) $(RUSTC) bar.rs diff --git a/src/test/run-make-fulldeps/long-linker-command-lines-cmd-exe/Makefile b/src/test/run-make-fulldeps/long-linker-command-lines-cmd-exe/Makefile index debe9e93824..a38f4fe5dc5 100644 --- a/src/test/run-make-fulldeps/long-linker-command-lines-cmd-exe/Makefile +++ b/src/test/run-make-fulldeps/long-linker-command-lines-cmd-exe/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk all: $(RUSTC) foo.rs -g diff --git a/src/test/run-make-fulldeps/long-linker-command-lines/Makefile b/src/test/run-make-fulldeps/long-linker-command-lines/Makefile index 5876fbc94bc..00199ca970d 100644 --- a/src/test/run-make-fulldeps/long-linker-command-lines/Makefile +++ b/src/test/run-make-fulldeps/long-linker-command-lines/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk all: $(RUSTC) foo.rs -g -O diff --git a/src/test/run-make-fulldeps/longjmp-across-rust/Makefile b/src/test/run-make-fulldeps/longjmp-across-rust/Makefile index 9d71ed8fcf3..848638d82dd 100644 --- a/src/test/run-make-fulldeps/longjmp-across-rust/Makefile +++ b/src/test/run-make-fulldeps/longjmp-across-rust/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk all: $(call NATIVE_STATICLIB,foo) $(RUSTC) main.rs diff --git a/src/test/run-make-fulldeps/ls-metadata/Makefile b/src/test/run-make-fulldeps/ls-metadata/Makefile index fc3f5bce0cd..e0f916a248e 100644 --- a/src/test/run-make-fulldeps/ls-metadata/Makefile +++ b/src/test/run-make-fulldeps/ls-metadata/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk all: $(RUSTC) foo.rs diff --git a/src/test/run-make-fulldeps/lto-dylib-dep/Makefile b/src/test/run-make-fulldeps/lto-dylib-dep/Makefile index ab8ee6c2ef7..41487b23c74 100644 --- a/src/test/run-make-fulldeps/lto-dylib-dep/Makefile +++ b/src/test/run-make-fulldeps/lto-dylib-dep/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk # Test that we don't run into an assertion when using a Rust dylib dependency # while compiling with full LTO. diff --git a/src/test/run-make-fulldeps/lto-empty/Makefile b/src/test/run-make-fulldeps/lto-empty/Makefile index 345d10bc4b9..b4345ba1883 100644 --- a/src/test/run-make-fulldeps/lto-empty/Makefile +++ b/src/test/run-make-fulldeps/lto-empty/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk all: cdylib-fat cdylib-thin diff --git a/src/test/run-make-fulldeps/lto-no-link-whole-rlib/Makefile b/src/test/run-make-fulldeps/lto-no-link-whole-rlib/Makefile index 25afad92adb..e576ee37cf7 100644 --- a/src/test/run-make-fulldeps/lto-no-link-whole-rlib/Makefile +++ b/src/test/run-make-fulldeps/lto-no-link-whole-rlib/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk all: $(call NATIVE_STATICLIB,foo) $(call NATIVE_STATICLIB,bar) $(RUSTC) lib1.rs diff --git a/src/test/run-make-fulldeps/lto-readonly-lib/Makefile b/src/test/run-make-fulldeps/lto-readonly-lib/Makefile index 0afbbc3450a..a20ecea88ea 100644 --- a/src/test/run-make-fulldeps/lto-readonly-lib/Makefile +++ b/src/test/run-make-fulldeps/lto-readonly-lib/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk all: $(RUSTC) lib.rs diff --git a/src/test/run-make-fulldeps/lto-smoke-c/Makefile b/src/test/run-make-fulldeps/lto-smoke-c/Makefile index 0f61f5de938..7c6ee3be849 100644 --- a/src/test/run-make-fulldeps/lto-smoke-c/Makefile +++ b/src/test/run-make-fulldeps/lto-smoke-c/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk # Apparently older versions of GCC segfault if -g is passed... CC := $(CC:-g=) diff --git a/src/test/run-make-fulldeps/lto-smoke/Makefile b/src/test/run-make-fulldeps/lto-smoke/Makefile index 9b1dc2550b2..8bce708b44b 100644 --- a/src/test/run-make-fulldeps/lto-smoke/Makefile +++ b/src/test/run-make-fulldeps/lto-smoke/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk all: noparam bool_true bool_false thin fat diff --git a/src/test/run-make-fulldeps/manual-crate-name/Makefile b/src/test/run-make-fulldeps/manual-crate-name/Makefile index 1d1419997a2..c00e20c7c57 100644 --- a/src/test/run-make-fulldeps/manual-crate-name/Makefile +++ b/src/test/run-make-fulldeps/manual-crate-name/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk all: $(RUSTC) --crate-name foo bar.rs diff --git a/src/test/run-make-fulldeps/manual-link/Makefile b/src/test/run-make-fulldeps/manual-link/Makefile index dccf0d99b0f..401f6eb440a 100644 --- a/src/test/run-make-fulldeps/manual-link/Makefile +++ b/src/test/run-make-fulldeps/manual-link/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk all: $(TMPDIR)/libbar.a $(RUSTC) foo.rs -lstatic=bar diff --git a/src/test/run-make-fulldeps/many-crates-but-no-match/Makefile b/src/test/run-make-fulldeps/many-crates-but-no-match/Makefile index e7268311b13..ca0ab8e9e5f 100644 --- a/src/test/run-make-fulldeps/many-crates-but-no-match/Makefile +++ b/src/test/run-make-fulldeps/many-crates-but-no-match/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk # Modelled after ui/changing-crates.rs test, but this one puts # more than one (mismatching) candidate crate into the search path, diff --git a/src/test/run-make-fulldeps/metadata-flag-frobs-symbols/Makefile b/src/test/run-make-fulldeps/metadata-flag-frobs-symbols/Makefile index 3ffbba9444b..dc6b10f4e9d 100644 --- a/src/test/run-make-fulldeps/metadata-flag-frobs-symbols/Makefile +++ b/src/test/run-make-fulldeps/metadata-flag-frobs-symbols/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk all: $(RUSTC) foo.rs -C metadata=a -C extra-filename=-a diff --git a/src/test/run-make-fulldeps/min-global-align/Makefile b/src/test/run-make-fulldeps/min-global-align/Makefile index 62102747004..82f38749e00 100644 --- a/src/test/run-make-fulldeps/min-global-align/Makefile +++ b/src/test/run-make-fulldeps/min-global-align/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk # only-linux diff --git a/src/test/run-make-fulldeps/mismatching-target-triples/Makefile b/src/test/run-make-fulldeps/mismatching-target-triples/Makefile index 1636e41b056..409388e0414 100644 --- a/src/test/run-make-fulldeps/mismatching-target-triples/Makefile +++ b/src/test/run-make-fulldeps/mismatching-target-triples/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk # Issue #10814 # diff --git a/src/test/run-make-fulldeps/missing-crate-dependency/Makefile b/src/test/run-make-fulldeps/missing-crate-dependency/Makefile index b5a5bf492ab..7c271ab8a90 100644 --- a/src/test/run-make-fulldeps/missing-crate-dependency/Makefile +++ b/src/test/run-make-fulldeps/missing-crate-dependency/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk all: $(RUSTC) --crate-type=rlib crateA.rs diff --git a/src/test/run-make-fulldeps/mixing-deps/Makefile b/src/test/run-make-fulldeps/mixing-deps/Makefile index 0e52d4a8bef..956e704ee16 100644 --- a/src/test/run-make-fulldeps/mixing-deps/Makefile +++ b/src/test/run-make-fulldeps/mixing-deps/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk all: $(RUSTC) both.rs -C prefer-dynamic diff --git a/src/test/run-make-fulldeps/mixing-formats/Makefile b/src/test/run-make-fulldeps/mixing-formats/Makefile index 48257669baf..b27e54257f9 100644 --- a/src/test/run-make-fulldeps/mixing-formats/Makefile +++ b/src/test/run-make-fulldeps/mixing-formats/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk # Testing various mixings of rlibs and dylibs. Makes sure that it's possible to # link an rlib to a dylib. The dependency tree among the file looks like: diff --git a/src/test/run-make-fulldeps/mixing-libs/Makefile b/src/test/run-make-fulldeps/mixing-libs/Makefile index babeeef164d..39cc0708ca1 100644 --- a/src/test/run-make-fulldeps/mixing-libs/Makefile +++ b/src/test/run-make-fulldeps/mixing-libs/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk all: $(RUSTC) rlib.rs diff --git a/src/test/run-make-fulldeps/msvc-opt-minsize/Makefile b/src/test/run-make-fulldeps/msvc-opt-minsize/Makefile index 1095a047dd1..a5f019f244e 100644 --- a/src/test/run-make-fulldeps/msvc-opt-minsize/Makefile +++ b/src/test/run-make-fulldeps/msvc-opt-minsize/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk all: $(RUSTC) foo.rs -Copt-level=z 2>&1 diff --git a/src/test/run-make-fulldeps/multiple-emits/Makefile b/src/test/run-make-fulldeps/multiple-emits/Makefile index e126422835c..d1f29764485 100644 --- a/src/test/run-make-fulldeps/multiple-emits/Makefile +++ b/src/test/run-make-fulldeps/multiple-emits/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk all: $(RUSTC) foo.rs --emit=asm,llvm-ir -o $(TMPDIR)/out 2>&1 diff --git a/src/test/run-make-fulldeps/no-builtins-lto/Makefile b/src/test/run-make-fulldeps/no-builtins-lto/Makefile index 2e41be39d5d..c8f05d9918b 100644 --- a/src/test/run-make-fulldeps/no-builtins-lto/Makefile +++ b/src/test/run-make-fulldeps/no-builtins-lto/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk all: # Compile a `#![no_builtins]` rlib crate diff --git a/src/test/run-make-fulldeps/no-duplicate-libs/Makefile b/src/test/run-make-fulldeps/no-duplicate-libs/Makefile index 13d8366c60a..b05aff7826e 100644 --- a/src/test/run-make-fulldeps/no-duplicate-libs/Makefile +++ b/src/test/run-make-fulldeps/no-duplicate-libs/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk ifdef IS_MSVC # FIXME(#27979) diff --git a/src/test/run-make-fulldeps/no-intermediate-extras/Makefile b/src/test/run-make-fulldeps/no-intermediate-extras/Makefile index 258cbf04c61..4116aac1b8f 100644 --- a/src/test/run-make-fulldeps/no-intermediate-extras/Makefile +++ b/src/test/run-make-fulldeps/no-intermediate-extras/Makefile @@ -1,6 +1,6 @@ # Regression test for issue #10973 --include ../tools.mk +include ../tools.mk all: $(RUSTC) --crate-type=rlib --test foo.rs diff --git a/src/test/run-make-fulldeps/obey-crate-type-flag/Makefile b/src/test/run-make-fulldeps/obey-crate-type-flag/Makefile index 903349152df..effcfc94cc5 100644 --- a/src/test/run-make-fulldeps/obey-crate-type-flag/Makefile +++ b/src/test/run-make-fulldeps/obey-crate-type-flag/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk # check that rustc builds all crate_type attributes # delete rlib diff --git a/src/test/run-make-fulldeps/output-filename-conflicts-with-directory/Makefile b/src/test/run-make-fulldeps/output-filename-conflicts-with-directory/Makefile index 74e5dcfcf36..45221356cd9 100644 --- a/src/test/run-make-fulldeps/output-filename-conflicts-with-directory/Makefile +++ b/src/test/run-make-fulldeps/output-filename-conflicts-with-directory/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk all: cp foo.rs $(TMPDIR)/foo.rs diff --git a/src/test/run-make-fulldeps/output-filename-overwrites-input/Makefile b/src/test/run-make-fulldeps/output-filename-overwrites-input/Makefile index 6377038b7be..33069c06f5a 100644 --- a/src/test/run-make-fulldeps/output-filename-overwrites-input/Makefile +++ b/src/test/run-make-fulldeps/output-filename-overwrites-input/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk all: cp foo.rs $(TMPDIR)/foo diff --git a/src/test/run-make-fulldeps/output-type-permutations/Makefile b/src/test/run-make-fulldeps/output-type-permutations/Makefile index b6e0cbaf5dd..791606c643b 100644 --- a/src/test/run-make-fulldeps/output-type-permutations/Makefile +++ b/src/test/run-make-fulldeps/output-type-permutations/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk all: $(RUSTC) foo.rs --crate-type=rlib,dylib,staticlib diff --git a/src/test/run-make-fulldeps/output-with-hyphens/Makefile b/src/test/run-make-fulldeps/output-with-hyphens/Makefile index 69a286f0b74..365fb6e591a 100644 --- a/src/test/run-make-fulldeps/output-with-hyphens/Makefile +++ b/src/test/run-make-fulldeps/output-with-hyphens/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk all: $(RUSTC) foo-bar.rs --crate-type bin diff --git a/src/test/run-make-fulldeps/override-aliased-flags/Makefile b/src/test/run-make-fulldeps/override-aliased-flags/Makefile index bea610eeb9f..186b8c7c85e 100644 --- a/src/test/run-make-fulldeps/override-aliased-flags/Makefile +++ b/src/test/run-make-fulldeps/override-aliased-flags/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk # FIXME: it would be good to check that it's actually the rightmost flags # that are used when multiple flags are specified, but I can't think of a diff --git a/src/test/run-make-fulldeps/panic-impl-transitive/Makefile b/src/test/run-make-fulldeps/panic-impl-transitive/Makefile index 1714578b2ba..c3192efcb5a 100644 --- a/src/test/run-make-fulldeps/panic-impl-transitive/Makefile +++ b/src/test/run-make-fulldeps/panic-impl-transitive/Makefile @@ -1,4 +1,4 @@ --include ../../run-make-fulldeps/tools.mk +include ../../run-make-fulldeps/tools.mk # NOTE we use --emit=llvm-ir to avoid running the linker (linking will fail because there's no main # in this crate) diff --git a/src/test/run-make-fulldeps/pass-non-c-like-enum-to-c/Makefile b/src/test/run-make-fulldeps/pass-non-c-like-enum-to-c/Makefile index f3d9357865c..42d3c977f75 100644 --- a/src/test/run-make-fulldeps/pass-non-c-like-enum-to-c/Makefile +++ b/src/test/run-make-fulldeps/pass-non-c-like-enum-to-c/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk all: $(call NATIVE_STATICLIB,test) $(RUSTC) nonclike.rs -L$(TMPDIR) -ltest diff --git a/src/test/run-make-fulldeps/pgo-branch-weights/Makefile b/src/test/run-make-fulldeps/pgo-branch-weights/Makefile index 9773e3f1fdf..c60206a1f34 100644 --- a/src/test/run-make-fulldeps/pgo-branch-weights/Makefile +++ b/src/test/run-make-fulldeps/pgo-branch-weights/Makefile @@ -4,7 +4,7 @@ # FIXME(mati865): MinGW GCC miscompiles compiler-rt profiling library but with Clang it works # properly. Since we only have GCC on the CI ignore the test for now. --include ../tools.mk +include ../tools.mk # For some very small programs GNU ld seems to not properly handle # instrumentation sections correctly. Neither Gold nor LLD have that problem. diff --git a/src/test/run-make-fulldeps/pgo-gen-lto/Makefile b/src/test/run-make-fulldeps/pgo-gen-lto/Makefile index a7d5c561632..3f2f6a838b5 100644 --- a/src/test/run-make-fulldeps/pgo-gen-lto/Makefile +++ b/src/test/run-make-fulldeps/pgo-gen-lto/Makefile @@ -4,7 +4,7 @@ # FIXME(mati865): MinGW GCC miscompiles compiler-rt profiling library but with Clang it works # properly. Since we only have GCC on the CI ignore the test for now. --include ../tools.mk +include ../tools.mk COMPILE_FLAGS=-Copt-level=3 -Clto=fat -Cprofile-generate="$(TMPDIR)" diff --git a/src/test/run-make-fulldeps/pgo-gen-no-imp-symbols/Makefile b/src/test/run-make-fulldeps/pgo-gen-no-imp-symbols/Makefile index 425bfc28a97..7f72b11b611 100644 --- a/src/test/run-make-fulldeps/pgo-gen-no-imp-symbols/Makefile +++ b/src/test/run-make-fulldeps/pgo-gen-no-imp-symbols/Makefile @@ -1,6 +1,6 @@ # needs-profiler-support --include ../tools.mk +include ../tools.mk COMPILE_FLAGS=-O -Ccodegen-units=1 -Cprofile-generate="$(TMPDIR)" diff --git a/src/test/run-make-fulldeps/pgo-gen/Makefile b/src/test/run-make-fulldeps/pgo-gen/Makefile index 6533355be34..4623a74957b 100644 --- a/src/test/run-make-fulldeps/pgo-gen/Makefile +++ b/src/test/run-make-fulldeps/pgo-gen/Makefile @@ -4,7 +4,7 @@ # FIXME(mati865): MinGW GCC miscompiles compiler-rt profiling library but with Clang it works # properly. Since we only have GCC on the CI ignore the test for now. --include ../tools.mk +include ../tools.mk COMPILE_FLAGS=-g -Cprofile-generate="$(TMPDIR)" diff --git a/src/test/run-make-fulldeps/pgo-indirect-call-promotion/Makefile b/src/test/run-make-fulldeps/pgo-indirect-call-promotion/Makefile index c0195dcbb31..45302215cc6 100644 --- a/src/test/run-make-fulldeps/pgo-indirect-call-promotion/Makefile +++ b/src/test/run-make-fulldeps/pgo-indirect-call-promotion/Makefile @@ -4,7 +4,7 @@ # FIXME(mati865): MinGW GCC miscompiles compiler-rt profiling library but with Clang it works # properly. Since we only have GCC on the CI ignore the test for now. --include ../tools.mk +include ../tools.mk all: # We don't compile `opaque` with either optimizations or instrumentation. diff --git a/src/test/run-make-fulldeps/pgo-use/Makefile b/src/test/run-make-fulldeps/pgo-use/Makefile index d7863c9c587..3bac9b77aa3 100644 --- a/src/test/run-make-fulldeps/pgo-use/Makefile +++ b/src/test/run-make-fulldeps/pgo-use/Makefile @@ -4,7 +4,7 @@ # FIXME(mati865): MinGW GCC miscompiles compiler-rt profiling library but with Clang it works # properly. Since we only have GCC on the CI ignore the test for now. --include ../tools.mk +include ../tools.mk # This test makes sure that PGO profiling data leads to cold functions being # marked as `cold` and hot functions with `inlinehint`. diff --git a/src/test/run-make-fulldeps/pointer-auth-link-with-c/Makefile b/src/test/run-make-fulldeps/pointer-auth-link-with-c/Makefile index d0e22cfef4c..7acea03802c 100644 --- a/src/test/run-make-fulldeps/pointer-auth-link-with-c/Makefile +++ b/src/test/run-make-fulldeps/pointer-auth-link-with-c/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk # only-aarch64 diff --git a/src/test/run-make-fulldeps/prefer-dylib/Makefile b/src/test/run-make-fulldeps/prefer-dylib/Makefile index bd44feecf2a..3817ca195eb 100644 --- a/src/test/run-make-fulldeps/prefer-dylib/Makefile +++ b/src/test/run-make-fulldeps/prefer-dylib/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk all: $(RUSTC) bar.rs --crate-type=dylib --crate-type=rlib -C prefer-dynamic diff --git a/src/test/run-make-fulldeps/prefer-rlib/Makefile b/src/test/run-make-fulldeps/prefer-rlib/Makefile index c6a239eef08..adc345d760d 100644 --- a/src/test/run-make-fulldeps/prefer-rlib/Makefile +++ b/src/test/run-make-fulldeps/prefer-rlib/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk all: $(RUSTC) bar.rs --crate-type=dylib --crate-type=rlib diff --git a/src/test/run-make-fulldeps/pretty-expanded/Makefile b/src/test/run-make-fulldeps/pretty-expanded/Makefile index e721c5afdd7..5a0097a8351 100644 --- a/src/test/run-make-fulldeps/pretty-expanded/Makefile +++ b/src/test/run-make-fulldeps/pretty-expanded/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk all: $(RUSTC) -o $(TMPDIR)/input.expanded.rs -Zunpretty=expanded input.rs diff --git a/src/test/run-make-fulldeps/pretty-print-to-file/Makefile b/src/test/run-make-fulldeps/pretty-print-to-file/Makefile index b224c52fcad..ca11b8c47f0 100644 --- a/src/test/run-make-fulldeps/pretty-print-to-file/Makefile +++ b/src/test/run-make-fulldeps/pretty-print-to-file/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk all: $(RUSTC) -o $(TMPDIR)/input.out -Zunpretty=normal input.rs diff --git a/src/test/run-make-fulldeps/print-cfg/Makefile b/src/test/run-make-fulldeps/print-cfg/Makefile index 5472baae3f2..126f5768c90 100644 --- a/src/test/run-make-fulldeps/print-cfg/Makefile +++ b/src/test/run-make-fulldeps/print-cfg/Makefile @@ -1,6 +1,6 @@ # needs-llvm-components: x86 arm --include ../tools.mk +include ../tools.mk all: default $(RUSTC) --target x86_64-pc-windows-gnu --print cfg | $(CGREP) windows diff --git a/src/test/run-make-fulldeps/print-target-list/Makefile b/src/test/run-make-fulldeps/print-target-list/Makefile index 5f10f2aa3b0..f23c40d4281 100644 --- a/src/test/run-make-fulldeps/print-target-list/Makefile +++ b/src/test/run-make-fulldeps/print-target-list/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk # Checks that all the targets returned by `rustc --print target-list` are valid # target specifications diff --git a/src/test/run-make-fulldeps/profile/Makefile b/src/test/run-make-fulldeps/profile/Makefile index 04d382b475e..fffc051adbf 100644 --- a/src/test/run-make-fulldeps/profile/Makefile +++ b/src/test/run-make-fulldeps/profile/Makefile @@ -1,6 +1,6 @@ # needs-profiler-support --include ../tools.mk +include ../tools.mk all: $(RUSTC) -g -Z profile test.rs diff --git a/src/test/run-make-fulldeps/prune-link-args/Makefile b/src/test/run-make-fulldeps/prune-link-args/Makefile index 3589f98e7e5..a359dc5aef1 100644 --- a/src/test/run-make-fulldeps/prune-link-args/Makefile +++ b/src/test/run-make-fulldeps/prune-link-args/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk # ignore-windows diff --git a/src/test/run-make-fulldeps/redundant-libs/Makefile b/src/test/run-make-fulldeps/redundant-libs/Makefile index e09841fb42e..b2dff05d163 100644 --- a/src/test/run-make-fulldeps/redundant-libs/Makefile +++ b/src/test/run-make-fulldeps/redundant-libs/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk # ignore-windows-msvc diff --git a/src/test/run-make-fulldeps/relocation-model/Makefile b/src/test/run-make-fulldeps/relocation-model/Makefile index 485ecbb4b5a..a31dbfd9167 100644 --- a/src/test/run-make-fulldeps/relocation-model/Makefile +++ b/src/test/run-make-fulldeps/relocation-model/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk all: others $(RUSTC) -C relocation-model=dynamic-no-pic foo.rs diff --git a/src/test/run-make-fulldeps/relro-levels/Makefile b/src/test/run-make-fulldeps/relro-levels/Makefile index aacb5acb7a3..6176fc1a589 100644 --- a/src/test/run-make-fulldeps/relro-levels/Makefile +++ b/src/test/run-make-fulldeps/relro-levels/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk # only-linux # diff --git a/src/test/run-make-fulldeps/remap-path-prefix/Makefile b/src/test/run-make-fulldeps/remap-path-prefix/Makefile index 86785c59509..2a7378fdf9e 100644 --- a/src/test/run-make-fulldeps/remap-path-prefix/Makefile +++ b/src/test/run-make-fulldeps/remap-path-prefix/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk # ignore-windows diff --git a/src/test/run-make-fulldeps/reproducible-build-2/Makefile b/src/test/run-make-fulldeps/reproducible-build-2/Makefile index fd94516fbba..1df5e102ce3 100644 --- a/src/test/run-make-fulldeps/reproducible-build-2/Makefile +++ b/src/test/run-make-fulldeps/reproducible-build-2/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk # ignore-musl # ignore-windows diff --git a/src/test/run-make-fulldeps/reproducible-build/Makefile b/src/test/run-make-fulldeps/reproducible-build/Makefile index adccc153568..642a480815b 100644 --- a/src/test/run-make-fulldeps/reproducible-build/Makefile +++ b/src/test/run-make-fulldeps/reproducible-build/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk # ignore-musl # Objects are reproducible but their path is not. diff --git a/src/test/run-make-fulldeps/resolve-rename/Makefile b/src/test/run-make-fulldeps/resolve-rename/Makefile index 4b0c36d01b7..00f83a5d6b2 100644 --- a/src/test/run-make-fulldeps/resolve-rename/Makefile +++ b/src/test/run-make-fulldeps/resolve-rename/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk all: $(RUSTC) -C extra-filename=-hash foo.rs diff --git a/src/test/run-make-fulldeps/return-non-c-like-enum-from-c/Makefile b/src/test/run-make-fulldeps/return-non-c-like-enum-from-c/Makefile index f3d9357865c..42d3c977f75 100644 --- a/src/test/run-make-fulldeps/return-non-c-like-enum-from-c/Makefile +++ b/src/test/run-make-fulldeps/return-non-c-like-enum-from-c/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk all: $(call NATIVE_STATICLIB,test) $(RUSTC) nonclike.rs -L$(TMPDIR) -ltest diff --git a/src/test/run-make-fulldeps/return-non-c-like-enum/Makefile b/src/test/run-make-fulldeps/return-non-c-like-enum/Makefile index 5b5d620efe6..513311c8289 100644 --- a/src/test/run-make-fulldeps/return-non-c-like-enum/Makefile +++ b/src/test/run-make-fulldeps/return-non-c-like-enum/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk all: $(RUSTC) --crate-type=staticlib nonclike.rs diff --git a/src/test/run-make-fulldeps/rlib-chain/Makefile b/src/test/run-make-fulldeps/rlib-chain/Makefile index 30b6811a388..236943a2a3b 100644 --- a/src/test/run-make-fulldeps/rlib-chain/Makefile +++ b/src/test/run-make-fulldeps/rlib-chain/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk all: $(RUSTC) m1.rs diff --git a/src/test/run-make-fulldeps/rustdoc-determinism/Makefile b/src/test/run-make-fulldeps/rustdoc-determinism/Makefile index 0534c2c3831..a3ef1690671 100644 --- a/src/test/run-make-fulldeps/rustdoc-determinism/Makefile +++ b/src/test/run-make-fulldeps/rustdoc-determinism/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk # Assert that the search index is generated deterministically, regardless of the # order that crates are documented in. diff --git a/src/test/run-make-fulldeps/rustdoc-error-lines/Makefile b/src/test/run-make-fulldeps/rustdoc-error-lines/Makefile index c9d41f0ec3b..2dc30f56b83 100644 --- a/src/test/run-make-fulldeps/rustdoc-error-lines/Makefile +++ b/src/test/run-make-fulldeps/rustdoc-error-lines/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk # Test that hir-tree output doesn't crash and includes # the string constant we would expect to see. diff --git a/src/test/run-make-fulldeps/rustdoc-io-error/Makefile b/src/test/run-make-fulldeps/rustdoc-io-error/Makefile index f95fa88d41c..27f5ecf94ab 100644 --- a/src/test/run-make-fulldeps/rustdoc-io-error/Makefile +++ b/src/test/run-make-fulldeps/rustdoc-io-error/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk # This test verifies that rustdoc doesn't ICE when it encounters an IO error # while generating files. Ideally this would be a rustdoc-ui test, so we could diff --git a/src/test/run-make-fulldeps/rustdoc-map-file/Makefile b/src/test/run-make-fulldeps/rustdoc-map-file/Makefile index ce977fa0cea..5cbf7747af6 100644 --- a/src/test/run-make-fulldeps/rustdoc-map-file/Makefile +++ b/src/test/run-make-fulldeps/rustdoc-map-file/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk all: $(RUSTDOC) -Z unstable-options --generate-redirect-map foo.rs -o "$(TMPDIR)/out" diff --git a/src/test/run-make-fulldeps/rustdoc-output-path/Makefile b/src/test/run-make-fulldeps/rustdoc-output-path/Makefile index 8ce1c699526..8f5cda9e56e 100644 --- a/src/test/run-make-fulldeps/rustdoc-output-path/Makefile +++ b/src/test/run-make-fulldeps/rustdoc-output-path/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk all: $(RUSTDOC) -o "$(TMPDIR)/foo/bar/doc" foo.rs diff --git a/src/test/run-make-fulldeps/rustdoc-scrape-examples-macros/Makefile b/src/test/run-make-fulldeps/rustdoc-scrape-examples-macros/Makefile index 4934e875da6..c857aa4b993 100644 --- a/src/test/run-make-fulldeps/rustdoc-scrape-examples-macros/Makefile +++ b/src/test/run-make-fulldeps/rustdoc-scrape-examples-macros/Makefile @@ -1,4 +1,4 @@ --include ../../run-make-fulldeps/tools.mk +include ../../run-make-fulldeps/tools.mk OUTPUT_DIR := "$(TMPDIR)/rustdoc" DYLIB_NAME := $(shell echo | $(RUSTC) --crate-name foobar_macro --crate-type dylib --print file-names -) diff --git a/src/test/run-make-fulldeps/rustdoc-themes/Makefile b/src/test/run-make-fulldeps/rustdoc-themes/Makefile index f3d07b25c47..a6d9a43addf 100644 --- a/src/test/run-make-fulldeps/rustdoc-themes/Makefile +++ b/src/test/run-make-fulldeps/rustdoc-themes/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk # Test that rustdoc will properly load in a theme file and display it in the theme selector. diff --git a/src/test/run-make-fulldeps/sanitizer-cdylib-link/Makefile b/src/test/run-make-fulldeps/sanitizer-cdylib-link/Makefile index e72fe5a5091..691585268bf 100644 --- a/src/test/run-make-fulldeps/sanitizer-cdylib-link/Makefile +++ b/src/test/run-make-fulldeps/sanitizer-cdylib-link/Makefile @@ -1,7 +1,7 @@ # needs-sanitizer-support # needs-sanitizer-address --include ../tools.mk +include ../tools.mk LOG := $(TMPDIR)/log.txt diff --git a/src/test/run-make-fulldeps/sanitizer-dylib-link/Makefile b/src/test/run-make-fulldeps/sanitizer-dylib-link/Makefile index b9a3f829555..b0a91e5b197 100644 --- a/src/test/run-make-fulldeps/sanitizer-dylib-link/Makefile +++ b/src/test/run-make-fulldeps/sanitizer-dylib-link/Makefile @@ -1,7 +1,7 @@ # needs-sanitizer-support # needs-sanitizer-address --include ../tools.mk +include ../tools.mk LOG := $(TMPDIR)/log.txt diff --git a/src/test/run-make-fulldeps/sanitizer-staticlib-link/Makefile b/src/test/run-make-fulldeps/sanitizer-staticlib-link/Makefile index 4894f65b114..7b1a286ed12 100644 --- a/src/test/run-make-fulldeps/sanitizer-staticlib-link/Makefile +++ b/src/test/run-make-fulldeps/sanitizer-staticlib-link/Makefile @@ -1,7 +1,7 @@ # needs-sanitizer-support # needs-sanitizer-address --include ../tools.mk +include ../tools.mk # This test first builds a staticlib with AddressSanitizer and checks that # linking it to an executable fails due to the missing sanitizer runtime. diff --git a/src/test/run-make-fulldeps/save-analysis-fail/Makefile b/src/test/run-make-fulldeps/save-analysis-fail/Makefile index f29f907cf38..69a2b274694 100644 --- a/src/test/run-make-fulldeps/save-analysis-fail/Makefile +++ b/src/test/run-make-fulldeps/save-analysis-fail/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk all: code krate2: krate2.rs $(RUSTC) $< diff --git a/src/test/run-make-fulldeps/save-analysis-rfc2126/Makefile b/src/test/run-make-fulldeps/save-analysis-rfc2126/Makefile index 36288c4b870..30f57034bba 100644 --- a/src/test/run-make-fulldeps/save-analysis-rfc2126/Makefile +++ b/src/test/run-make-fulldeps/save-analysis-rfc2126/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk all: extern_absolute_paths.rs krate2 $(RUSTC) extern_absolute_paths.rs -Zsave-analysis --edition=2018 --extern krate2 diff --git a/src/test/run-make-fulldeps/save-analysis/Makefile b/src/test/run-make-fulldeps/save-analysis/Makefile index 7296fb9cc59..b8b6be13dbd 100644 --- a/src/test/run-make-fulldeps/save-analysis/Makefile +++ b/src/test/run-make-fulldeps/save-analysis/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk all: code krate2: krate2.rs $(RUSTC) $< diff --git a/src/test/run-make-fulldeps/separate-link-fail/Makefile b/src/test/run-make-fulldeps/separate-link-fail/Makefile index c759f42a235..bfd18fbf972 100644 --- a/src/test/run-make-fulldeps/separate-link-fail/Makefile +++ b/src/test/run-make-fulldeps/separate-link-fail/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk all: echo 'fn main(){}' > $(TMPDIR)/main.rs diff --git a/src/test/run-make-fulldeps/separate-link/Makefile b/src/test/run-make-fulldeps/separate-link/Makefile index 060484e89f9..3ccdb6275d1 100644 --- a/src/test/run-make-fulldeps/separate-link/Makefile +++ b/src/test/run-make-fulldeps/separate-link/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk all: echo 'fn main(){}' | $(RUSTC) -Z no-link - diff --git a/src/test/run-make-fulldeps/sepcomp-cci-copies/Makefile b/src/test/run-make-fulldeps/sepcomp-cci-copies/Makefile index 77d1d71e9b2..df289d0b0b1 100644 --- a/src/test/run-make-fulldeps/sepcomp-cci-copies/Makefile +++ b/src/test/run-make-fulldeps/sepcomp-cci-copies/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk # Check that cross-crate inlined items are inlined in all compilation units # that refer to them, and not in any other compilation units. diff --git a/src/test/run-make-fulldeps/sepcomp-inlining/Makefile b/src/test/run-make-fulldeps/sepcomp-inlining/Makefile index 1d20d940000..327aeb75e5e 100644 --- a/src/test/run-make-fulldeps/sepcomp-inlining/Makefile +++ b/src/test/run-make-fulldeps/sepcomp-inlining/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk # Test that #[inline] functions still get inlined across compilation unit # boundaries. Compilation should produce three IR files, but only the two diff --git a/src/test/run-make-fulldeps/sepcomp-separate/Makefile b/src/test/run-make-fulldeps/sepcomp-separate/Makefile index 5b8bdb0fad8..62cf54a88fb 100644 --- a/src/test/run-make-fulldeps/sepcomp-separate/Makefile +++ b/src/test/run-make-fulldeps/sepcomp-separate/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk # Test that separate compilation actually puts code into separate compilation # units. `foo.rs` defines `magic_fn` in three different modules, which should diff --git a/src/test/run-make-fulldeps/share-generics-dylib/Makefile b/src/test/run-make-fulldeps/share-generics-dylib/Makefile index 282cb2461f6..065fb574c3c 100644 --- a/src/test/run-make-fulldeps/share-generics-dylib/Makefile +++ b/src/test/run-make-fulldeps/share-generics-dylib/Makefile @@ -9,7 +9,7 @@ # # This is regression test for https://github.com/rust-lang/rust/issues/67276. --include ../../run-make-fulldeps/tools.mk +include ../../run-make-fulldeps/tools.mk COMMON_ARGS=-Cprefer-dynamic -Zshare-generics=yes -Ccodegen-units=1 -Csymbol-mangling-version=v0 diff --git a/src/test/run-make-fulldeps/simd-ffi/Makefile b/src/test/run-make-fulldeps/simd-ffi/Makefile index e9c974a0137..29735347041 100644 --- a/src/test/run-make-fulldeps/simd-ffi/Makefile +++ b/src/test/run-make-fulldeps/simd-ffi/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk TARGETS = ifeq ($(filter arm,$(LLVM_COMPONENTS)),arm) diff --git a/src/test/run-make-fulldeps/simple-dylib/Makefile b/src/test/run-make-fulldeps/simple-dylib/Makefile index 26730820fea..5dda5d66d1c 100644 --- a/src/test/run-make-fulldeps/simple-dylib/Makefile +++ b/src/test/run-make-fulldeps/simple-dylib/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk all: $(RUSTC) bar.rs --crate-type=dylib -C prefer-dynamic $(RUSTC) foo.rs diff --git a/src/test/run-make-fulldeps/simple-rlib/Makefile b/src/test/run-make-fulldeps/simple-rlib/Makefile index 7b156cb8748..d912b8a7bab 100644 --- a/src/test/run-make-fulldeps/simple-rlib/Makefile +++ b/src/test/run-make-fulldeps/simple-rlib/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk all: $(RUSTC) bar.rs --crate-type=rlib $(RUSTC) foo.rs diff --git a/src/test/run-make-fulldeps/split-debuginfo/Makefile b/src/test/run-make-fulldeps/split-debuginfo/Makefile index e2dc64d8ce2..371fb5ffba2 100644 --- a/src/test/run-make-fulldeps/split-debuginfo/Makefile +++ b/src/test/run-make-fulldeps/split-debuginfo/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk all: off packed unpacked diff --git a/src/test/run-make-fulldeps/stable-symbol-names/Makefile b/src/test/run-make-fulldeps/stable-symbol-names/Makefile index 451af809b22..bbfb8e38881 100644 --- a/src/test/run-make-fulldeps/stable-symbol-names/Makefile +++ b/src/test/run-make-fulldeps/stable-symbol-names/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk # The following command will: # 1. dump the symbols of a library using `nm` diff --git a/src/test/run-make-fulldeps/static-dylib-by-default/Makefile b/src/test/run-make-fulldeps/static-dylib-by-default/Makefile index 6409aa66ae0..eedd0b32092 100644 --- a/src/test/run-make-fulldeps/static-dylib-by-default/Makefile +++ b/src/test/run-make-fulldeps/static-dylib-by-default/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk TO_LINK := $(call DYLIB,bar) ifdef IS_MSVC diff --git a/src/test/run-make-fulldeps/static-extern-type/Makefile b/src/test/run-make-fulldeps/static-extern-type/Makefile index 5879fc0ce77..e9aa95e63a0 100644 --- a/src/test/run-make-fulldeps/static-extern-type/Makefile +++ b/src/test/run-make-fulldeps/static-extern-type/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk all: $(call NATIVE_STATICLIB,define-foo) $(RUSTC) -ldefine-foo use-foo.rs diff --git a/src/test/run-make-fulldeps/static-unwinding/Makefile b/src/test/run-make-fulldeps/static-unwinding/Makefile index cb039744265..9c755d4ab18 100644 --- a/src/test/run-make-fulldeps/static-unwinding/Makefile +++ b/src/test/run-make-fulldeps/static-unwinding/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk all: $(RUSTC) lib.rs diff --git a/src/test/run-make-fulldeps/staticlib-blank-lib/Makefile b/src/test/run-make-fulldeps/staticlib-blank-lib/Makefile index 92a278825c2..fcbf87758fb 100644 --- a/src/test/run-make-fulldeps/staticlib-blank-lib/Makefile +++ b/src/test/run-make-fulldeps/staticlib-blank-lib/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk all: $(AR) crus $(TMPDIR)/libfoo.a foo.rs diff --git a/src/test/run-make-fulldeps/std-core-cycle/Makefile b/src/test/run-make-fulldeps/std-core-cycle/Makefile index ce3b2d46bbc..4f252863767 100644 --- a/src/test/run-make-fulldeps/std-core-cycle/Makefile +++ b/src/test/run-make-fulldeps/std-core-cycle/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk ifeq ($(UNAME),Darwin) FLAGS := diff --git a/src/test/run-make-fulldeps/stdin-non-utf8/Makefile b/src/test/run-make-fulldeps/stdin-non-utf8/Makefile index 7948c442616..709d4cf1408 100644 --- a/src/test/run-make-fulldeps/stdin-non-utf8/Makefile +++ b/src/test/run-make-fulldeps/stdin-non-utf8/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk all: cp non-utf8 $(TMPDIR)/non-utf.rs diff --git a/src/test/run-make-fulldeps/suspicious-library/Makefile b/src/test/run-make-fulldeps/suspicious-library/Makefile index 12f437075fb..2af9e85c228 100644 --- a/src/test/run-make-fulldeps/suspicious-library/Makefile +++ b/src/test/run-make-fulldeps/suspicious-library/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk all: $(RUSTC) foo.rs -C prefer-dynamic diff --git a/src/test/run-make-fulldeps/symbols-include-type-name/Makefile b/src/test/run-make-fulldeps/symbols-include-type-name/Makefile index 0850a2633e5..ac26a852e36 100644 --- a/src/test/run-make-fulldeps/symbols-include-type-name/Makefile +++ b/src/test/run-make-fulldeps/symbols-include-type-name/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk # Check that symbol names for methods include type names, instead of . diff --git a/src/test/run-make-fulldeps/symlinked-extern/Makefile b/src/test/run-make-fulldeps/symlinked-extern/Makefile index e5061fddead..058f43e857a 100644 --- a/src/test/run-make-fulldeps/symlinked-extern/Makefile +++ b/src/test/run-make-fulldeps/symlinked-extern/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk # ignore-windows # `ln` is actually `cp` on msys. diff --git a/src/test/run-make-fulldeps/symlinked-libraries/Makefile b/src/test/run-make-fulldeps/symlinked-libraries/Makefile index 618ae87bfe3..576bf7e54be 100644 --- a/src/test/run-make-fulldeps/symlinked-libraries/Makefile +++ b/src/test/run-make-fulldeps/symlinked-libraries/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk # ignore-windows # `ln` is actually `cp` on msys. diff --git a/src/test/run-make-fulldeps/symlinked-rlib/Makefile b/src/test/run-make-fulldeps/symlinked-rlib/Makefile index 996989ce4d8..49d3f220a35 100644 --- a/src/test/run-make-fulldeps/symlinked-rlib/Makefile +++ b/src/test/run-make-fulldeps/symlinked-rlib/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk # ignore-windows # `ln` is actually `cp` on msys. diff --git a/src/test/run-make-fulldeps/target-cpu-native/Makefile b/src/test/run-make-fulldeps/target-cpu-native/Makefile index d152e9f76d3..eb3ca1e13aa 100644 --- a/src/test/run-make-fulldeps/target-cpu-native/Makefile +++ b/src/test/run-make-fulldeps/target-cpu-native/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk # only-linux # only-x86_64 diff --git a/src/test/run-make-fulldeps/target-specs/Makefile b/src/test/run-make-fulldeps/target-specs/Makefile index fb95ee5539a..a33f5368e3c 100644 --- a/src/test/run-make-fulldeps/target-specs/Makefile +++ b/src/test/run-make-fulldeps/target-specs/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk all: $(RUSTC) foo.rs --target=my-awesome-platform.json --crate-type=lib --emit=asm $(CGREP) -v morestack < $(TMPDIR)/foo.s diff --git a/src/test/run-make-fulldeps/target-without-atomic-cas/Makefile b/src/test/run-make-fulldeps/target-without-atomic-cas/Makefile index 9868fc1d417..451f03d66cd 100644 --- a/src/test/run-make-fulldeps/target-without-atomic-cas/Makefile +++ b/src/test/run-make-fulldeps/target-without-atomic-cas/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk # The target used below doesn't support atomic CAS operations. Verify that's the case all: diff --git a/src/test/run-make-fulldeps/test-harness/Makefile b/src/test/run-make-fulldeps/test-harness/Makefile index 39477c07ced..1fe059b07d2 100644 --- a/src/test/run-make-fulldeps/test-harness/Makefile +++ b/src/test/run-make-fulldeps/test-harness/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk all: # check that #[cfg_attr(..., ignore)] does the right thing. diff --git a/src/test/run-make-fulldeps/type-mismatch-same-crate-name/Makefile b/src/test/run-make-fulldeps/type-mismatch-same-crate-name/Makefile index 802b3df460a..9f4be712634 100644 --- a/src/test/run-make-fulldeps/type-mismatch-same-crate-name/Makefile +++ b/src/test/run-make-fulldeps/type-mismatch-same-crate-name/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk all: # compile two different versions of crateA diff --git a/src/test/run-make-fulldeps/use-extern-for-plugins/Makefile b/src/test/run-make-fulldeps/use-extern-for-plugins/Makefile index 838b1a2719b..6ae53afad20 100644 --- a/src/test/run-make-fulldeps/use-extern-for-plugins/Makefile +++ b/src/test/run-make-fulldeps/use-extern-for-plugins/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk # ignore-freebsd # ignore-openbsd diff --git a/src/test/run-make-fulldeps/use-suggestions-rust-2018/Makefile b/src/test/run-make-fulldeps/use-suggestions-rust-2018/Makefile index fc39691c507..37cd6283c0a 100644 --- a/src/test/run-make-fulldeps/use-suggestions-rust-2018/Makefile +++ b/src/test/run-make-fulldeps/use-suggestions-rust-2018/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk all: $(RUSTC) ep-nested-lib.rs diff --git a/src/test/run-make-fulldeps/used-cdylib-macos/Makefile b/src/test/run-make-fulldeps/used-cdylib-macos/Makefile index 4828d9c8aad..38a4c31c7b3 100644 --- a/src/test/run-make-fulldeps/used-cdylib-macos/Makefile +++ b/src/test/run-make-fulldeps/used-cdylib-macos/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk # only-macos # diff --git a/src/test/run-make-fulldeps/used/Makefile b/src/test/run-make-fulldeps/used/Makefile index 4d904472931..e80eb9e4020 100644 --- a/src/test/run-make-fulldeps/used/Makefile +++ b/src/test/run-make-fulldeps/used/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk # ignore-windows-msvc diff --git a/src/test/run-make-fulldeps/version/Makefile b/src/test/run-make-fulldeps/version/Makefile index 23e14a9cb93..3a130545d69 100644 --- a/src/test/run-make-fulldeps/version/Makefile +++ b/src/test/run-make-fulldeps/version/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk all: $(RUSTC) -V diff --git a/src/test/run-make-fulldeps/volatile-intrinsics/Makefile b/src/test/run-make-fulldeps/volatile-intrinsics/Makefile index acbadbef9fb..2a78c7b9cfe 100644 --- a/src/test/run-make-fulldeps/volatile-intrinsics/Makefile +++ b/src/test/run-make-fulldeps/volatile-intrinsics/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk all: # The tests must pass... diff --git a/src/test/run-make-fulldeps/weird-output-filenames/Makefile b/src/test/run-make-fulldeps/weird-output-filenames/Makefile index f161fe9f8e8..d3a34e3b46e 100644 --- a/src/test/run-make-fulldeps/weird-output-filenames/Makefile +++ b/src/test/run-make-fulldeps/weird-output-filenames/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk all: cp foo.rs $(TMPDIR)/.foo.rs diff --git a/src/test/run-make-fulldeps/windows-binary-no-external-deps/Makefile b/src/test/run-make-fulldeps/windows-binary-no-external-deps/Makefile index f6adb6d7627..8960020fed5 100644 --- a/src/test/run-make-fulldeps/windows-binary-no-external-deps/Makefile +++ b/src/test/run-make-fulldeps/windows-binary-no-external-deps/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk # only-windows diff --git a/src/test/run-make-fulldeps/windows-spawn/Makefile b/src/test/run-make-fulldeps/windows-spawn/Makefile index c09ce8109e6..b6cdb169bab 100644 --- a/src/test/run-make-fulldeps/windows-spawn/Makefile +++ b/src/test/run-make-fulldeps/windows-spawn/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk # only-windows diff --git a/src/test/run-make-fulldeps/windows-subsystem/Makefile b/src/test/run-make-fulldeps/windows-subsystem/Makefile index 34fb5db32f9..78c4e2ac1e8 100644 --- a/src/test/run-make-fulldeps/windows-subsystem/Makefile +++ b/src/test/run-make-fulldeps/windows-subsystem/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk all: $(RUSTC) windows.rs diff --git a/src/test/run-make/const_fn_mir/Makefile b/src/test/run-make/const_fn_mir/Makefile index 2aa0bc9d45d..ad5695093a1 100644 --- a/src/test/run-make/const_fn_mir/Makefile +++ b/src/test/run-make/const_fn_mir/Makefile @@ -1,4 +1,4 @@ --include ../../run-make-fulldeps/tools.mk +include ../../run-make-fulldeps/tools.mk all: $(RUSTC) main.rs --emit=mir -o "$(TMPDIR)"/dump.mir diff --git a/src/test/run-make/coverage-reports/Makefile b/src/test/run-make/coverage-reports/Makefile index 4e75672f275..cac881ece12 100644 --- a/src/test/run-make/coverage-reports/Makefile +++ b/src/test/run-make/coverage-reports/Makefile @@ -75,7 +75,7 @@ ifdef RUSTC_BLESS_TEST rm -f expected_* endif --include clear_expected_if_blessed +include clear_expected_if_blessed %: $(SOURCEDIR)/lib/%.rs # Compile the test library with coverage instrumentation diff --git a/src/test/run-make/dep-graph/Makefile b/src/test/run-make/dep-graph/Makefile index 88916022c7c..ae97b1672ae 100644 --- a/src/test/run-make/dep-graph/Makefile +++ b/src/test/run-make/dep-graph/Makefile @@ -1,4 +1,4 @@ --include ../../run-make-fulldeps/tools.mk +include ../../run-make-fulldeps/tools.mk # ignore-cross-compile diff --git a/src/test/run-make/emit-named-files/Makefile b/src/test/run-make/emit-named-files/Makefile index 03eb83b97e3..e081fa4793b 100644 --- a/src/test/run-make/emit-named-files/Makefile +++ b/src/test/run-make/emit-named-files/Makefile @@ -1,4 +1,4 @@ --include ../../run-make-fulldeps/tools.mk +include ../../run-make-fulldeps/tools.mk OUT=$(TMPDIR)/emit diff --git a/src/test/run-make/emit-path-unhashed/Makefile b/src/test/run-make/emit-path-unhashed/Makefile index b6b2d8af648..c144d4aa92f 100644 --- a/src/test/run-make/emit-path-unhashed/Makefile +++ b/src/test/run-make/emit-path-unhashed/Makefile @@ -1,4 +1,4 @@ --include ../../run-make-fulldeps/tools.mk +include ../../run-make-fulldeps/tools.mk OUT=$(TMPDIR)/emit diff --git a/src/test/run-make/emit-shared-files/Makefile b/src/test/run-make/emit-shared-files/Makefile index 9f46883beaa..09b4c29c1dd 100644 --- a/src/test/run-make/emit-shared-files/Makefile +++ b/src/test/run-make/emit-shared-files/Makefile @@ -1,4 +1,4 @@ --include ../../run-make-fulldeps/tools.mk +include ../../run-make-fulldeps/tools.mk INVOCATION_ONLY = $(TMPDIR)/invocation-only TOOLCHAIN_ONLY = $(TMPDIR)/toolchain-only diff --git a/src/test/run-make/env-dep-info/Makefile b/src/test/run-make/env-dep-info/Makefile index 25d9a31c2d6..1675a61b167 100644 --- a/src/test/run-make/env-dep-info/Makefile +++ b/src/test/run-make/env-dep-info/Makefile @@ -1,4 +1,4 @@ --include ../../run-make-fulldeps/tools.mk +include ../../run-make-fulldeps/tools.mk # FIXME(eddyb) provide `HOST_RUSTC` and `TARGET_RUSTC` # instead of hardcoding them everywhere they're needed. diff --git a/src/test/run-make/export-executable-symbols/Makefile b/src/test/run-make/export-executable-symbols/Makefile index 5006f9cb8cf..daa77c99dcd 100644 --- a/src/test/run-make/export-executable-symbols/Makefile +++ b/src/test/run-make/export-executable-symbols/Makefile @@ -1,4 +1,4 @@ --include ../../run-make-fulldeps/tools.mk +include ../../run-make-fulldeps/tools.mk # ignore-wasm32 # ignore-wasm64 diff --git a/src/test/run-make/fmt-write-bloat/Makefile b/src/test/run-make/fmt-write-bloat/Makefile index 26e08086a72..07e6e025e08 100644 --- a/src/test/run-make/fmt-write-bloat/Makefile +++ b/src/test/run-make/fmt-write-bloat/Makefile @@ -1,4 +1,4 @@ --include ../../run-make-fulldeps/tools.mk +include ../../run-make-fulldeps/tools.mk # ignore-windows diff --git a/src/test/run-make/issue-10971-temps-dir/Makefile b/src/test/run-make/issue-10971-temps-dir/Makefile index 5ce27192603..e589bbffe60 100644 --- a/src/test/run-make/issue-10971-temps-dir/Makefile +++ b/src/test/run-make/issue-10971-temps-dir/Makefile @@ -1,4 +1,4 @@ --include ../../run-make-fulldeps/tools.mk +include ../../run-make-fulldeps/tools.mk # Regression test for issue #10971 # Running two invocations in parallel would overwrite each other's temp files. diff --git a/src/test/run-make/issue-47384/Makefile b/src/test/run-make/issue-47384/Makefile index f10365f8c88..0aadf6c88c9 100644 --- a/src/test/run-make/issue-47384/Makefile +++ b/src/test/run-make/issue-47384/Makefile @@ -1,4 +1,4 @@ --include ../../run-make-fulldeps/tools.mk +include ../../run-make-fulldeps/tools.mk # only-linux # ignore-cross-compile diff --git a/src/test/run-make/issue-71519/Makefile b/src/test/run-make/issue-71519/Makefile index 636665ec1d0..4475649ca92 100644 --- a/src/test/run-make/issue-71519/Makefile +++ b/src/test/run-make/issue-71519/Makefile @@ -1,4 +1,4 @@ --include ../../run-make-fulldeps/tools.mk +include ../../run-make-fulldeps/tools.mk # needs-rust-lld all: diff --git a/src/test/run-make/issue-85401-static-mir/Makefile b/src/test/run-make/issue-85401-static-mir/Makefile index 5e094cb4d33..99590166bca 100644 --- a/src/test/run-make/issue-85401-static-mir/Makefile +++ b/src/test/run-make/issue-85401-static-mir/Makefile @@ -1,4 +1,4 @@ --include ../../run-make-fulldeps/tools.mk +include ../../run-make-fulldeps/tools.mk # Regression test for issue #85401 # Verify that we do not ICE when trying to access MIR for statics, diff --git a/src/test/run-make/issue-85441/Makefile b/src/test/run-make/issue-85441/Makefile index c7ae708c173..f04b07d51fa 100644 --- a/src/test/run-make/issue-85441/Makefile +++ b/src/test/run-make/issue-85441/Makefile @@ -1,6 +1,6 @@ # only-windows-msvc --include ../../run-make-fulldeps/tools.mk +include ../../run-make-fulldeps/tools.mk # Tests that WS2_32.dll is not unnecessarily linked, see issue #85441 diff --git a/src/test/run-make/issue-88756-default-output/Makefile b/src/test/run-make/issue-88756-default-output/Makefile index cacbcbf3933..275c35c2629 100644 --- a/src/test/run-make/issue-88756-default-output/Makefile +++ b/src/test/run-make/issue-88756-default-output/Makefile @@ -1,4 +1,4 @@ --include ../../run-make-fulldeps/tools.mk +include ../../run-make-fulldeps/tools.mk all: $(BARE_RUSTDOC) 2>&1 | sed -E 's@/nightly/|/beta/|/stable/|/1\.[0-9]+\.[0-9]+/@/$$CHANNEL/@g' | diff - output-default.stdout diff --git a/src/test/run-make/issue-96498/Makefile b/src/test/run-make/issue-96498/Makefile index eae6400aee4..ce2b1b1ff7c 100644 --- a/src/test/run-make/issue-96498/Makefile +++ b/src/test/run-make/issue-96498/Makefile @@ -1,7 +1,7 @@ # only-windows # needs-rust-lld --include ../../run-make-fulldeps/tools.mk +include ../../run-make-fulldeps/tools.mk # Ensure that LLD can link all: diff --git a/src/test/run-make/libtest-thread-limit/Makefile b/src/test/run-make/libtest-thread-limit/Makefile index 29c1bc71d87..d43a89e60ca 100644 --- a/src/test/run-make/libtest-thread-limit/Makefile +++ b/src/test/run-make/libtest-thread-limit/Makefile @@ -1,4 +1,4 @@ --include ../../run-make-fulldeps/tools.mk +include ../../run-make-fulldeps/tools.mk # only-linux diff --git a/src/test/run-make/llvm-outputs/Makefile b/src/test/run-make/llvm-outputs/Makefile index d7f67577b04..a3f25eba0b2 100644 --- a/src/test/run-make/llvm-outputs/Makefile +++ b/src/test/run-make/llvm-outputs/Makefile @@ -1,4 +1,4 @@ --include ../../run-make-fulldeps/tools.mk +include ../../run-make-fulldeps/tools.mk all: echo 'fn main() {}' | $(BARE_RUSTC) - --out-dir=$(TMPDIR)/random_directory_that_does_not_exist_ir/ --emit=llvm-ir diff --git a/src/test/run-make/native-link-modifier-bundle/Makefile b/src/test/run-make/native-link-modifier-bundle/Makefile index e4b0f74ac26..7c78d7783e0 100644 --- a/src/test/run-make/native-link-modifier-bundle/Makefile +++ b/src/test/run-make/native-link-modifier-bundle/Makefile @@ -1,7 +1,7 @@ # ignore-cross-compile # ignore-windows-msvc --include ../../run-make-fulldeps/tools.mk +include ../../run-make-fulldeps/tools.mk # We're using the llvm-nm instead of the system nm to ensure it is compatible # with the LLVM bitcode generated by rustc. diff --git a/src/test/run-make/native-link-modifier-whole-archive/Makefile b/src/test/run-make/native-link-modifier-whole-archive/Makefile index 967cb065cad..f26bd864ced 100644 --- a/src/test/run-make/native-link-modifier-whole-archive/Makefile +++ b/src/test/run-make/native-link-modifier-whole-archive/Makefile @@ -8,7 +8,7 @@ # that code would never make it into the final executable and we'd thus be missing some # of the output. --include ../../run-make-fulldeps/tools.mk +include ../../run-make-fulldeps/tools.mk all: $(TMPDIR)/$(call BIN,directly_linked) \ $(TMPDIR)/$(call BIN,directly_linked_test_plus_whole_archive) \ diff --git a/src/test/run-make/pass-linker-flags-from-dep/Makefile b/src/test/run-make/pass-linker-flags-from-dep/Makefile index 365216b4c35..b9426326aea 100644 --- a/src/test/run-make/pass-linker-flags-from-dep/Makefile +++ b/src/test/run-make/pass-linker-flags-from-dep/Makefile @@ -1,4 +1,4 @@ --include ../../run-make-fulldeps/tools.mk +include ../../run-make-fulldeps/tools.mk all: # Build deps diff --git a/src/test/run-make/pass-linker-flags/Makefile b/src/test/run-make/pass-linker-flags/Makefile index 02b1e2179e1..a3efb8df6ac 100644 --- a/src/test/run-make/pass-linker-flags/Makefile +++ b/src/test/run-make/pass-linker-flags/Makefile @@ -1,4 +1,4 @@ --include ../../run-make-fulldeps/tools.mk +include ../../run-make-fulldeps/tools.mk all: $(RUSTC) rs.rs -Z unstable-options -l static=l1 -l link-arg=a1 -l static=l2 -l link-arg=a2 -l dylib=d1 -l link-arg=a3 --print link-args | $(CGREP) -e 'l1.*a1.*l2.*a2.*d1.*a3' diff --git a/src/test/run-make/raw-dylib-alt-calling-convention/Makefile b/src/test/run-make/raw-dylib-alt-calling-convention/Makefile index a254285ab76..03f8778d25d 100644 --- a/src/test/run-make/raw-dylib-alt-calling-convention/Makefile +++ b/src/test/run-make/raw-dylib-alt-calling-convention/Makefile @@ -3,7 +3,7 @@ # only-x86 # only-windows --include ../../run-make-fulldeps/tools.mk +include ../../run-make-fulldeps/tools.mk all: $(RUSTC) --crate-type lib --crate-name raw_dylib_alt_calling_convention_test lib.rs diff --git a/src/test/run-make/raw-dylib-c/Makefile b/src/test/run-make/raw-dylib-c/Makefile index 713f665078e..f47ab24f4fb 100644 --- a/src/test/run-make/raw-dylib-c/Makefile +++ b/src/test/run-make/raw-dylib-c/Makefile @@ -2,7 +2,7 @@ # only-windows --include ../../run-make-fulldeps/tools.mk +include ../../run-make-fulldeps/tools.mk all: $(RUSTC) --crate-type lib --crate-name raw_dylib_test lib.rs diff --git a/src/test/run-make/raw-dylib-link-ordinal/Makefile b/src/test/run-make/raw-dylib-link-ordinal/Makefile index c9baa3c1ec9..b55a94dbc46 100644 --- a/src/test/run-make/raw-dylib-link-ordinal/Makefile +++ b/src/test/run-make/raw-dylib-link-ordinal/Makefile @@ -2,7 +2,7 @@ # only-windows --include ../../run-make-fulldeps/tools.mk +include ../../run-make-fulldeps/tools.mk all: $(RUSTC) --crate-type lib --crate-name raw_dylib_test lib.rs diff --git a/src/test/run-make/raw-dylib-stdcall-ordinal/Makefile b/src/test/run-make/raw-dylib-stdcall-ordinal/Makefile index 3360a97b5ff..b9deb7729c2 100644 --- a/src/test/run-make/raw-dylib-stdcall-ordinal/Makefile +++ b/src/test/run-make/raw-dylib-stdcall-ordinal/Makefile @@ -3,7 +3,7 @@ # only-x86 # only-windows --include ../../run-make-fulldeps/tools.mk +include ../../run-make-fulldeps/tools.mk all: $(RUSTC) --crate-type lib --crate-name raw_dylib_test lib.rs diff --git a/src/test/run-make/remap-path-prefix-dwarf/Makefile b/src/test/run-make/remap-path-prefix-dwarf/Makefile index 561a343d60b..fbaea7b68fe 100644 --- a/src/test/run-make/remap-path-prefix-dwarf/Makefile +++ b/src/test/run-make/remap-path-prefix-dwarf/Makefile @@ -6,7 +6,7 @@ SRC_DIR := $(abspath .) SRC_DIR_PARENT := $(abspath ..) --include ../../run-make-fulldeps/tools.mk +include ../../run-make-fulldeps/tools.mk all: \ abs_input_outside_working_dir \ diff --git a/src/test/run-make/rustc-macro-dep-files/Makefile b/src/test/run-make/rustc-macro-dep-files/Makefile index a08a63fb44b..6ae659db2e9 100644 --- a/src/test/run-make/rustc-macro-dep-files/Makefile +++ b/src/test/run-make/rustc-macro-dep-files/Makefile @@ -1,4 +1,4 @@ --include ../../run-make-fulldeps/tools.mk +include ../../run-make-fulldeps/tools.mk # FIXME(eddyb) provide `HOST_RUSTC` and `TARGET_RUSTC` # instead of hardcoding them everywhere they're needed. diff --git a/src/test/run-make/rustdoc-scrape-examples-invalid-expr/Makefile b/src/test/run-make/rustdoc-scrape-examples-invalid-expr/Makefile index dce8b83eefe..7786ff762cb 100644 --- a/src/test/run-make/rustdoc-scrape-examples-invalid-expr/Makefile +++ b/src/test/run-make/rustdoc-scrape-examples-invalid-expr/Makefile @@ -1,5 +1,5 @@ deps := ex --include ../rustdoc-scrape-examples-multiple/scrape.mk +include ../rustdoc-scrape-examples-multiple/scrape.mk all: scrape diff --git a/src/test/run-make/rustdoc-scrape-examples-multiple/Makefile b/src/test/run-make/rustdoc-scrape-examples-multiple/Makefile index 897805e4405..453a7d4bc8b 100644 --- a/src/test/run-make/rustdoc-scrape-examples-multiple/Makefile +++ b/src/test/run-make/rustdoc-scrape-examples-multiple/Makefile @@ -1,5 +1,5 @@ deps := ex ex2 --include ./scrape.mk +include ./scrape.mk all: scrape diff --git a/src/test/run-make/rustdoc-scrape-examples-multiple/scrape.mk b/src/test/run-make/rustdoc-scrape-examples-multiple/scrape.mk index d49b6c1f290..7a28d2145d5 100644 --- a/src/test/run-make/rustdoc-scrape-examples-multiple/scrape.mk +++ b/src/test/run-make/rustdoc-scrape-examples-multiple/scrape.mk @@ -1,4 +1,4 @@ --include ../../run-make-fulldeps/tools.mk +include ../../run-make-fulldeps/tools.mk OUTPUT_DIR := "$(TMPDIR)/rustdoc" diff --git a/src/test/run-make/rustdoc-scrape-examples-ordering/Makefile b/src/test/run-make/rustdoc-scrape-examples-ordering/Makefile index 339d539bfd5..bf45b8148c0 100644 --- a/src/test/run-make/rustdoc-scrape-examples-ordering/Makefile +++ b/src/test/run-make/rustdoc-scrape-examples-ordering/Makefile @@ -1,5 +1,5 @@ deps := ex1 ex2 --include ../rustdoc-scrape-examples-multiple/scrape.mk +include ../rustdoc-scrape-examples-multiple/scrape.mk all: scrape diff --git a/src/test/run-make/rustdoc-scrape-examples-remap/Makefile b/src/test/run-make/rustdoc-scrape-examples-remap/Makefile index dce8b83eefe..7786ff762cb 100644 --- a/src/test/run-make/rustdoc-scrape-examples-remap/Makefile +++ b/src/test/run-make/rustdoc-scrape-examples-remap/Makefile @@ -1,5 +1,5 @@ deps := ex --include ../rustdoc-scrape-examples-multiple/scrape.mk +include ../rustdoc-scrape-examples-multiple/scrape.mk all: scrape diff --git a/src/test/run-make/rustdoc-scrape-examples-test/Makefile b/src/test/run-make/rustdoc-scrape-examples-test/Makefile index 9f80a8d9602..1235ead6751 100644 --- a/src/test/run-make/rustdoc-scrape-examples-test/Makefile +++ b/src/test/run-make/rustdoc-scrape-examples-test/Makefile @@ -1,6 +1,6 @@ extra_flags := --scrape-tests deps := ex --include ../rustdoc-scrape-examples-multiple/scrape.mk +include ../rustdoc-scrape-examples-multiple/scrape.mk all: scrape diff --git a/src/test/run-make/rustdoc-scrape-examples-whitespace/Makefile b/src/test/run-make/rustdoc-scrape-examples-whitespace/Makefile index dce8b83eefe..7786ff762cb 100644 --- a/src/test/run-make/rustdoc-scrape-examples-whitespace/Makefile +++ b/src/test/run-make/rustdoc-scrape-examples-whitespace/Makefile @@ -1,5 +1,5 @@ deps := ex --include ../rustdoc-scrape-examples-multiple/scrape.mk +include ../rustdoc-scrape-examples-multiple/scrape.mk all: scrape diff --git a/src/test/run-make/rustdoc-with-out-dir-option/Makefile b/src/test/run-make/rustdoc-with-out-dir-option/Makefile index f79fce8eeea..b3c3f5230c1 100644 --- a/src/test/run-make/rustdoc-with-out-dir-option/Makefile +++ b/src/test/run-make/rustdoc-with-out-dir-option/Makefile @@ -1,4 +1,4 @@ --include ../../run-make-fulldeps/tools.mk +include ../../run-make-fulldeps/tools.mk OUTPUT_DIR := "$(TMPDIR)/rustdoc" diff --git a/src/test/run-make/rustdoc-with-output-option/Makefile b/src/test/run-make/rustdoc-with-output-option/Makefile index 654f9672588..02093a35cfc 100644 --- a/src/test/run-make/rustdoc-with-output-option/Makefile +++ b/src/test/run-make/rustdoc-with-output-option/Makefile @@ -1,4 +1,4 @@ --include ../../run-make-fulldeps/tools.mk +include ../../run-make-fulldeps/tools.mk OUTPUT_DIR := "$(TMPDIR)/rustdoc" diff --git a/src/test/run-make/rustdoc-with-short-out-dir-option/Makefile b/src/test/run-make/rustdoc-with-short-out-dir-option/Makefile index 1e9ba71de26..dc5056a86dd 100644 --- a/src/test/run-make/rustdoc-with-short-out-dir-option/Makefile +++ b/src/test/run-make/rustdoc-with-short-out-dir-option/Makefile @@ -1,4 +1,4 @@ --include ../../run-make-fulldeps/tools.mk +include ../../run-make-fulldeps/tools.mk OUTPUT_DIR := "$(TMPDIR)/rustdoc" diff --git a/src/test/run-make/static-pie/Makefile b/src/test/run-make/static-pie/Makefile index 945ec1724ac..e71770636ee 100644 --- a/src/test/run-make/static-pie/Makefile +++ b/src/test/run-make/static-pie/Makefile @@ -1,4 +1,4 @@ --include ../../run-make-fulldeps/tools.mk +include ../../run-make-fulldeps/tools.mk # only-x86_64 # only-linux diff --git a/src/test/run-make/thumb-none-cortex-m/Makefile b/src/test/run-make/thumb-none-cortex-m/Makefile index 13385369e44..aa046af95da 100644 --- a/src/test/run-make/thumb-none-cortex-m/Makefile +++ b/src/test/run-make/thumb-none-cortex-m/Makefile @@ -1,4 +1,4 @@ --include ../../run-make-fulldeps/tools.mk +include ../../run-make-fulldeps/tools.mk # How to run this # $ ./x.py clean diff --git a/src/test/run-make/thumb-none-qemu/Makefile b/src/test/run-make/thumb-none-qemu/Makefile index ab8b90e154e..328758d41ba 100644 --- a/src/test/run-make/thumb-none-qemu/Makefile +++ b/src/test/run-make/thumb-none-qemu/Makefile @@ -1,4 +1,4 @@ --include ../../run-make-fulldeps/tools.mk +include ../../run-make-fulldeps/tools.mk # only-thumb diff --git a/src/test/run-make/track-path-dep-info/Makefile b/src/test/run-make/track-path-dep-info/Makefile index 465d3744789..ee853943f8b 100644 --- a/src/test/run-make/track-path-dep-info/Makefile +++ b/src/test/run-make/track-path-dep-info/Makefile @@ -1,4 +1,4 @@ --include ../../run-make-fulldeps/tools.mk +include ../../run-make-fulldeps/tools.mk # FIXME(eddyb) provide `HOST_RUSTC` and `TARGET_RUSTC` # instead of hardcoding them everywhere they're needed. diff --git a/src/test/run-make/unstable-flag-required/Makefile b/src/test/run-make/unstable-flag-required/Makefile index b8769d5f690..d3a734fae77 100644 --- a/src/test/run-make/unstable-flag-required/Makefile +++ b/src/test/run-make/unstable-flag-required/Makefile @@ -1,4 +1,4 @@ --include ../../run-make-fulldeps/tools.mk +include ../../run-make-fulldeps/tools.mk all: $(RUSTDOC) --output-format=json x.html 2>&1 | diff - output-format-json.stderr diff --git a/src/test/run-make/wasm-abi/Makefile b/src/test/run-make/wasm-abi/Makefile index 61fc4e8f57f..e713ca1876d 100644 --- a/src/test/run-make/wasm-abi/Makefile +++ b/src/test/run-make/wasm-abi/Makefile @@ -1,4 +1,4 @@ --include ../../run-make-fulldeps/tools.mk +include ../../run-make-fulldeps/tools.mk # only-wasm32-bare diff --git a/src/test/run-make/wasm-custom-section/Makefile b/src/test/run-make/wasm-custom-section/Makefile index 2f48b852566..92b0802e30a 100644 --- a/src/test/run-make/wasm-custom-section/Makefile +++ b/src/test/run-make/wasm-custom-section/Makefile @@ -1,4 +1,4 @@ --include ../../run-make-fulldeps/tools.mk +include ../../run-make-fulldeps/tools.mk # only-wasm32-bare diff --git a/src/test/run-make/wasm-custom-sections-opt/Makefile b/src/test/run-make/wasm-custom-sections-opt/Makefile index 76698c0aae3..e5b45d96310 100644 --- a/src/test/run-make/wasm-custom-sections-opt/Makefile +++ b/src/test/run-make/wasm-custom-sections-opt/Makefile @@ -1,4 +1,4 @@ --include ../../run-make-fulldeps/tools.mk +include ../../run-make-fulldeps/tools.mk # only-wasm32-bare diff --git a/src/test/run-make/wasm-export-all-symbols/Makefile b/src/test/run-make/wasm-export-all-symbols/Makefile index 7e47ba4850e..834f4d258db 100644 --- a/src/test/run-make/wasm-export-all-symbols/Makefile +++ b/src/test/run-make/wasm-export-all-symbols/Makefile @@ -1,4 +1,4 @@ --include ../../run-make-fulldeps/tools.mk +include ../../run-make-fulldeps/tools.mk # only-wasm32-bare diff --git a/src/test/run-make/wasm-import-module/Makefile b/src/test/run-make/wasm-import-module/Makefile index fe63e66f242..18cef16aac3 100644 --- a/src/test/run-make/wasm-import-module/Makefile +++ b/src/test/run-make/wasm-import-module/Makefile @@ -1,4 +1,4 @@ --include ../../run-make-fulldeps/tools.mk +include ../../run-make-fulldeps/tools.mk # only-wasm32-bare diff --git a/src/test/run-make/wasm-panic-small/Makefile b/src/test/run-make/wasm-panic-small/Makefile index 68397e4bc6e..2af9f71357e 100644 --- a/src/test/run-make/wasm-panic-small/Makefile +++ b/src/test/run-make/wasm-panic-small/Makefile @@ -1,4 +1,4 @@ --include ../../run-make-fulldeps/tools.mk +include ../../run-make-fulldeps/tools.mk # only-wasm32-bare diff --git a/src/test/run-make/wasm-spurious-import/Makefile b/src/test/run-make/wasm-spurious-import/Makefile index 1bb59dc1bfa..6f50e6e554e 100644 --- a/src/test/run-make/wasm-spurious-import/Makefile +++ b/src/test/run-make/wasm-spurious-import/Makefile @@ -1,4 +1,4 @@ --include ../../run-make-fulldeps/tools.mk +include ../../run-make-fulldeps/tools.mk # only-wasm32-bare diff --git a/src/test/run-make/wasm-stringify-ints-small/Makefile b/src/test/run-make/wasm-stringify-ints-small/Makefile index 01e1c6b0ce8..2fa2c954d4a 100644 --- a/src/test/run-make/wasm-stringify-ints-small/Makefile +++ b/src/test/run-make/wasm-stringify-ints-small/Makefile @@ -1,4 +1,4 @@ --include ../../run-make-fulldeps/tools.mk +include ../../run-make-fulldeps/tools.mk ifeq ($(TARGET),wasm32-unknown-unknown) all: diff --git a/src/test/run-make/wasm-symbols-different-module/Makefile b/src/test/run-make/wasm-symbols-different-module/Makefile index bb6a5d3c9d2..9e657222dea 100644 --- a/src/test/run-make/wasm-symbols-different-module/Makefile +++ b/src/test/run-make/wasm-symbols-different-module/Makefile @@ -1,4 +1,4 @@ --include ../../run-make-fulldeps/tools.mk +include ../../run-make-fulldeps/tools.mk # only-wasm32-bare diff --git a/src/test/run-make/wasm-symbols-not-exported/Makefile b/src/test/run-make/wasm-symbols-not-exported/Makefile index 62bd0f0872e..60b0dee001f 100644 --- a/src/test/run-make/wasm-symbols-not-exported/Makefile +++ b/src/test/run-make/wasm-symbols-not-exported/Makefile @@ -1,4 +1,4 @@ --include ../../run-make-fulldeps/tools.mk +include ../../run-make-fulldeps/tools.mk # only-wasm32-bare diff --git a/src/test/run-make/wasm-symbols-not-imported/Makefile b/src/test/run-make/wasm-symbols-not-imported/Makefile index 7a923375c18..dc7618c19a7 100644 --- a/src/test/run-make/wasm-symbols-not-imported/Makefile +++ b/src/test/run-make/wasm-symbols-not-imported/Makefile @@ -1,4 +1,4 @@ --include ../../run-make-fulldeps/tools.mk +include ../../run-make-fulldeps/tools.mk # only-wasm32-bare diff --git a/src/test/run-make/x86_64-fortanix-unknown-sgx-lvi/Makefile b/src/test/run-make/x86_64-fortanix-unknown-sgx-lvi/Makefile index 6a04d343910..84dcd239351 100644 --- a/src/test/run-make/x86_64-fortanix-unknown-sgx-lvi/Makefile +++ b/src/test/run-make/x86_64-fortanix-unknown-sgx-lvi/Makefile @@ -1,4 +1,4 @@ --include ../../run-make-fulldeps/tools.mk +include ../../run-make-fulldeps/tools.mk #only-x86_64-fortanix-unknown-sgx diff --git a/src/test/ui/borrowck/index-mut-help.stderr b/src/test/ui/borrowck/index-mut-help.stderr index 057c6ee15f3..0ce60e3eb1d 100644 --- a/src/test/ui/borrowck/index-mut-help.stderr +++ b/src/test/ui/borrowck/index-mut-help.stderr @@ -5,6 +5,7 @@ LL | map["peter"].clear(); | ^^^^^^^^^^^^^^^^^^^^ cannot borrow as mutable | = help: trait `IndexMut` is required to modify indexed content, but it is not implemented for `HashMap<&str, String>` + = help: to modify a `HashMap<&str, String>`, use `.get_mut()`, `.insert()` or the entry API error[E0594]: cannot assign to data in an index of `HashMap<&str, String>` --> $DIR/index-mut-help.rs:12:5 @@ -13,6 +14,7 @@ LL | map["peter"] = "0".to_string(); | ^^^^^^^^^^^^ cannot assign | = help: trait `IndexMut` is required to modify indexed content, but it is not implemented for `HashMap<&str, String>` + = help: to modify a `HashMap<&str, String>`, use `.get_mut()`, `.insert()` or the entry API error[E0596]: cannot borrow data in an index of `HashMap<&str, String>` as mutable --> $DIR/index-mut-help.rs:13:13 @@ -21,6 +23,7 @@ LL | let _ = &mut map["peter"]; | ^^^^^^^^^^^^^^^^^ cannot borrow as mutable | = help: trait `IndexMut` is required to modify indexed content, but it is not implemented for `HashMap<&str, String>` + = help: to modify a `HashMap<&str, String>`, use `.get_mut()`, `.insert()` or the entry API error: aborting due to 3 previous errors diff --git a/src/test/ui/btreemap/btreemap-index-mut.rs b/src/test/ui/btreemap/btreemap-index-mut.rs new file mode 100644 index 00000000000..62972acab86 --- /dev/null +++ b/src/test/ui/btreemap/btreemap-index-mut.rs @@ -0,0 +1,6 @@ +use std::collections::BTreeMap; + +fn main() { + let mut map = BTreeMap::::new(); + map[&0] = 1; //~ ERROR cannot assign +} diff --git a/src/test/ui/btreemap/btreemap-index-mut.stderr b/src/test/ui/btreemap/btreemap-index-mut.stderr new file mode 100644 index 00000000000..260f7100074 --- /dev/null +++ b/src/test/ui/btreemap/btreemap-index-mut.stderr @@ -0,0 +1,12 @@ +error[E0594]: cannot assign to data in an index of `BTreeMap` + --> $DIR/btreemap-index-mut.rs:5:5 + | +LL | map[&0] = 1; + | ^^^^^^^^^^^ cannot assign + | + = help: trait `IndexMut` is required to modify indexed content, but it is not implemented for `BTreeMap` + = help: to modify a `BTreeMap`, use `.get_mut()`, `.insert()` or the entry API + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0594`. diff --git a/src/test/ui/closures/2229_closure_analysis/run_pass/destructure-pattern-closure-within-closure.stderr b/src/test/ui/closures/2229_closure_analysis/run_pass/destructure-pattern-closure-within-closure.stderr index 40274c88318..cf8bd7a0a27 100644 --- a/src/test/ui/closures/2229_closure_analysis/run_pass/destructure-pattern-closure-within-closure.stderr +++ b/src/test/ui/closures/2229_closure_analysis/run_pass/destructure-pattern-closure-within-closure.stderr @@ -1,8 +1,8 @@ -warning: unused variable: `t2` - --> $DIR/destructure-pattern-closure-within-closure.rs:13:21 +warning: unused variable: `g2` + --> $DIR/destructure-pattern-closure-within-closure.rs:10:17 | -LL | let (_, t2) = t; - | ^^ help: if this is intentional, prefix it with an underscore: `_t2` +LL | let (_, g2) = g; + | ^^ help: if this is intentional, prefix it with an underscore: `_g2` | note: the lint level is defined here --> $DIR/destructure-pattern-closure-within-closure.rs:3:9 @@ -11,11 +11,11 @@ LL | #![warn(unused)] | ^^^^^^ = note: `#[warn(unused_variables)]` implied by `#[warn(unused)]` -warning: unused variable: `g2` - --> $DIR/destructure-pattern-closure-within-closure.rs:10:17 +warning: unused variable: `t2` + --> $DIR/destructure-pattern-closure-within-closure.rs:13:21 | -LL | let (_, g2) = g; - | ^^ help: if this is intentional, prefix it with an underscore: `_g2` +LL | let (_, t2) = t; + | ^^ help: if this is intentional, prefix it with an underscore: `_t2` warning: 2 warnings emitted diff --git a/src/test/ui/coherence/coherence-negative-outlives-lifetimes.rs b/src/test/ui/coherence/coherence-negative-outlives-lifetimes.rs index 221c1bc23b3..3acf0d8d39a 100644 --- a/src/test/ui/coherence/coherence-negative-outlives-lifetimes.rs +++ b/src/test/ui/coherence/coherence-negative-outlives-lifetimes.rs @@ -1,9 +1,9 @@ // revisions: stock with_negative_coherence +//[with_negative_coherence] check-pass + #![feature(negative_impls)] #![cfg_attr(with_negative_coherence, feature(with_negative_coherence))] -// FIXME: this should compile - trait MyPredicate<'a> {} impl<'a, T> !MyPredicate<'a> for &'a T where T: 'a {} @@ -12,6 +12,6 @@ trait MyTrait<'a> {} impl<'a, T: MyPredicate<'a>> MyTrait<'a> for T {} impl<'a, T> MyTrait<'a> for &'a T {} -//~^ ERROR: conflicting implementations of trait `MyTrait<'_>` for type `&_` +//[stock]~^ ERROR: conflicting implementations of trait `MyTrait<'_>` for type `&_` fn main() {} diff --git a/src/test/ui/coherence/coherence-negative-outlives-lifetimes.with_negative_coherence.stderr b/src/test/ui/coherence/coherence-negative-outlives-lifetimes.with_negative_coherence.stderr deleted file mode 100644 index 097cc4e0fe3..00000000000 --- a/src/test/ui/coherence/coherence-negative-outlives-lifetimes.with_negative_coherence.stderr +++ /dev/null @@ -1,11 +0,0 @@ -error[E0119]: conflicting implementations of trait `MyTrait<'_>` for type `&_` - --> $DIR/coherence-negative-outlives-lifetimes.rs:14:1 - | -LL | impl<'a, T: MyPredicate<'a>> MyTrait<'a> for T {} - | ---------------------------------------------- first implementation here -LL | impl<'a, T> MyTrait<'a> for &'a T {} - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `&_` - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0119`. diff --git a/src/test/ui/hashmap/hashmap-index-mut.rs b/src/test/ui/hashmap/hashmap-index-mut.rs new file mode 100644 index 00000000000..98448e9d5f0 --- /dev/null +++ b/src/test/ui/hashmap/hashmap-index-mut.rs @@ -0,0 +1,6 @@ +use std::collections::HashMap; + +fn main() { + let mut map = HashMap::::new(); + map[&0] = 1; //~ ERROR cannot assign +} diff --git a/src/test/ui/hashmap/hashmap-index-mut.stderr b/src/test/ui/hashmap/hashmap-index-mut.stderr new file mode 100644 index 00000000000..c72b380f466 --- /dev/null +++ b/src/test/ui/hashmap/hashmap-index-mut.stderr @@ -0,0 +1,12 @@ +error[E0594]: cannot assign to data in an index of `HashMap` + --> $DIR/hashmap-index-mut.rs:5:5 + | +LL | map[&0] = 1; + | ^^^^^^^^^^^ cannot assign + | + = help: trait `IndexMut` is required to modify indexed content, but it is not implemented for `HashMap` + = help: to modify a `HashMap`, use `.get_mut()`, `.insert()` or the entry API + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0594`. diff --git a/src/test/ui/impl-trait/impl-generic-mismatch.rs b/src/test/ui/impl-trait/impl-generic-mismatch.rs index ba678bb032d..fb8bde0d081 100644 --- a/src/test/ui/impl-trait/impl-generic-mismatch.rs +++ b/src/test/ui/impl-trait/impl-generic-mismatch.rs @@ -18,6 +18,15 @@ impl Bar for () { //~^ Error method `bar` has incompatible signature for trait } +trait Baz { + fn baz(&self, _: &U, _: &T); +} + +impl Baz for () { + fn baz(&self, _: &impl Debug, _: &T) { } + //~^ Error method `baz` has incompatible signature for trait +} + // With non-local trait (#49841): use std::hash::{Hash, Hasher}; diff --git a/src/test/ui/impl-trait/impl-generic-mismatch.stderr b/src/test/ui/impl-trait/impl-generic-mismatch.stderr index 489afd7615f..542f02d7ec5 100644 --- a/src/test/ui/impl-trait/impl-generic-mismatch.stderr +++ b/src/test/ui/impl-trait/impl-generic-mismatch.stderr @@ -27,8 +27,22 @@ help: try changing the `impl Trait` argument to a generic parameter LL | fn bar(&self, _: &U) { } | ++++++++++ ~ +error[E0643]: method `baz` has incompatible signature for trait + --> $DIR/impl-generic-mismatch.rs:26:33 + | +LL | fn baz(&self, _: &U, _: &T); + | - declaration in trait here +... +LL | fn baz(&self, _: &impl Debug, _: &T) { } + | ^^^^^^^^^^ expected generic parameter, found `impl Trait` + | +help: try changing the `impl Trait` argument to a generic parameter + | +LL | fn baz(&self, _: &T, _: &T) { } + | ~~~~~~~~~~~~~~~~~~~~ ~ + error[E0643]: method `hash` has incompatible signature for trait - --> $DIR/impl-generic-mismatch.rs:28:33 + --> $DIR/impl-generic-mismatch.rs:37:33 | LL | fn hash(&self, hasher: &mut impl Hasher) {} | ^^^^^^^^^^^ expected generic parameter, found `impl Trait` @@ -38,6 +52,6 @@ LL | fn hash(&self, hasher: &mut impl Hasher) {} LL | fn hash(&self, state: &mut H); | - declaration in trait here -error: aborting due to 3 previous errors +error: aborting due to 4 previous errors For more information about this error, try `rustc --explain E0643`. diff --git a/src/test/ui/issues/issue-41726.stderr b/src/test/ui/issues/issue-41726.stderr index 22631e7c2a3..9c70ab7d971 100644 --- a/src/test/ui/issues/issue-41726.stderr +++ b/src/test/ui/issues/issue-41726.stderr @@ -5,6 +5,7 @@ LL | things[src.as_str()].sort(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot borrow as mutable | = help: trait `IndexMut` is required to modify indexed content, but it is not implemented for `HashMap>` + = help: to modify a `HashMap>`, use `.get_mut()`, `.insert()` or the entry API error: aborting due to previous error diff --git a/src/test/ui/lint/unused/issue-54180-unused-ref-field.stderr b/src/test/ui/lint/unused/issue-54180-unused-ref-field.stderr index c501aa25f13..f2e6168998c 100644 --- a/src/test/ui/lint/unused/issue-54180-unused-ref-field.stderr +++ b/src/test/ui/lint/unused/issue-54180-unused-ref-field.stderr @@ -11,12 +11,6 @@ LL | #![deny(unused)] | ^^^^^^ = note: `#[deny(unused_variables)]` implied by `#[deny(unused)]` -error: unused variable: `x` - --> $DIR/issue-54180-unused-ref-field.rs:29:45 - | -LL | let _: i32 = points.iter().map(|Point { x, y }| y).sum(); - | ^ help: try ignoring the field: `x: _` - error: unused variable: `f1` --> $DIR/issue-54180-unused-ref-field.rs:26:13 | @@ -29,5 +23,11 @@ error: unused variable: `x` LL | Point { y, ref mut x } => y, | ^^^^^^^^^ help: try ignoring the field: `x: _` +error: unused variable: `x` + --> $DIR/issue-54180-unused-ref-field.rs:29:45 + | +LL | let _: i32 = points.iter().map(|Point { x, y }| y).sum(); + | ^ help: try ignoring the field: `x: _` + error: aborting due to 4 previous errors diff --git a/src/test/ui/lint/unused/lint-unused-variables.stderr b/src/test/ui/lint/unused/lint-unused-variables.stderr index d6e684e8306..fd9a5bcbfc4 100644 --- a/src/test/ui/lint/unused/lint-unused-variables.stderr +++ b/src/test/ui/lint/unused/lint-unused-variables.stderr @@ -16,30 +16,6 @@ error: unused variable: `b` LL | b: i32, | ^ help: if this is intentional, prefix it with an underscore: `_b` -error: unused variable: `a` - --> $DIR/lint-unused-variables.rs:68:9 - | -LL | a: i32, - | ^ help: if this is intentional, prefix it with an underscore: `_a` - -error: unused variable: `b` - --> $DIR/lint-unused-variables.rs:74:9 - | -LL | b: i32, - | ^ help: if this is intentional, prefix it with an underscore: `_b` - -error: unused variable: `b` - --> $DIR/lint-unused-variables.rs:42:9 - | -LL | b: i32, - | ^ help: if this is intentional, prefix it with an underscore: `_b` - -error: unused variable: `b` - --> $DIR/lint-unused-variables.rs:47:9 - | -LL | b: i32, - | ^ help: if this is intentional, prefix it with an underscore: `_b` - error: unused variable: `a` --> $DIR/lint-unused-variables.rs:22:9 | @@ -58,6 +34,18 @@ error: unused variable: `b` LL | b: i32, | ^ help: if this is intentional, prefix it with an underscore: `_b` +error: unused variable: `b` + --> $DIR/lint-unused-variables.rs:42:9 + | +LL | b: i32, + | ^ help: if this is intentional, prefix it with an underscore: `_b` + +error: unused variable: `b` + --> $DIR/lint-unused-variables.rs:47:9 + | +LL | b: i32, + | ^ help: if this is intentional, prefix it with an underscore: `_b` + error: unused variable: `b` --> $DIR/lint-unused-variables.rs:55:9 | @@ -70,5 +58,17 @@ error: unused variable: `b` LL | b: i32, | ^ help: if this is intentional, prefix it with an underscore: `_b` +error: unused variable: `a` + --> $DIR/lint-unused-variables.rs:68:9 + | +LL | a: i32, + | ^ help: if this is intentional, prefix it with an underscore: `_a` + +error: unused variable: `b` + --> $DIR/lint-unused-variables.rs:74:9 + | +LL | b: i32, + | ^ help: if this is intentional, prefix it with an underscore: `_b` + error: aborting due to 11 previous errors diff --git a/src/test/ui/liveness/liveness-consts.stderr b/src/test/ui/liveness/liveness-consts.stderr index adaf5431629..16209d16c19 100644 --- a/src/test/ui/liveness/liveness-consts.stderr +++ b/src/test/ui/liveness/liveness-consts.stderr @@ -39,12 +39,6 @@ warning: unused variable: `z` LL | pub fn f(x: [u8; { let s = 17; 100 }]) -> [u8; { let z = 18; 100 }] { | ^ help: if this is intentional, prefix it with an underscore: `_z` -warning: unused variable: `z` - --> $DIR/liveness-consts.rs:60:13 - | -LL | let z = 42; - | ^ help: if this is intentional, prefix it with an underscore: `_z` - warning: value assigned to `t` is never read --> $DIR/liveness-consts.rs:42:9 | @@ -59,5 +53,11 @@ warning: unused variable: `w` LL | let w = 10; | ^ help: if this is intentional, prefix it with an underscore: `_w` +warning: unused variable: `z` + --> $DIR/liveness-consts.rs:60:13 + | +LL | let z = 42; + | ^ help: if this is intentional, prefix it with an underscore: `_z` + warning: 8 warnings emitted diff --git a/src/test/ui/regions/do-not-suggest-adding-bound-to-opaque-type.rs b/src/test/ui/regions/do-not-suggest-adding-bound-to-opaque-type.rs new file mode 100644 index 00000000000..a1e801e3923 --- /dev/null +++ b/src/test/ui/regions/do-not-suggest-adding-bound-to-opaque-type.rs @@ -0,0 +1,12 @@ +pub trait T {} + +struct S<'a>(&'a ()); + +impl<'a> T for S<'a> {} + +fn foo() -> impl T { + let x = (); + S(&x) //~ ERROR `x` does not live long enough +} + +fn main() {} diff --git a/src/test/ui/regions/do-not-suggest-adding-bound-to-opaque-type.stderr b/src/test/ui/regions/do-not-suggest-adding-bound-to-opaque-type.stderr new file mode 100644 index 00000000000..6ea238f302f --- /dev/null +++ b/src/test/ui/regions/do-not-suggest-adding-bound-to-opaque-type.stderr @@ -0,0 +1,14 @@ +error[E0597]: `x` does not live long enough + --> $DIR/do-not-suggest-adding-bound-to-opaque-type.rs:9:7 + | +LL | S(&x) + | --^^- + | | | + | | borrowed value does not live long enough + | opaque type requires that `x` is borrowed for `'static` +LL | } + | - `x` dropped here while still borrowed + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0597`. diff --git a/src/test/ui/rfc-2565-param-attrs/param-attrs-cfg.stderr b/src/test/ui/rfc-2565-param-attrs/param-attrs-cfg.stderr index 1ced8d8a14a..6d18d295cfc 100644 --- a/src/test/ui/rfc-2565-param-attrs/param-attrs-cfg.stderr +++ b/src/test/ui/rfc-2565-param-attrs/param-attrs-cfg.stderr @@ -22,48 +22,6 @@ error: unused variable: `c` LL | #[cfg_attr(nothing, cfg(nothing))] c: i32, | ^ help: if this is intentional, prefix it with an underscore: `_c` -error: unused variable: `a` - --> $DIR/param-attrs-cfg.rs:107:27 - | -LL | #[cfg(something)] a: i32, - | ^ help: if this is intentional, prefix it with an underscore: `_a` - -error: unused variable: `b` - --> $DIR/param-attrs-cfg.rs:113:27 - | -LL | #[cfg(something)] b: i32, - | ^ help: if this is intentional, prefix it with an underscore: `_b` - -error: unused variable: `c` - --> $DIR/param-attrs-cfg.rs:115:44 - | -LL | #[cfg_attr(nothing, cfg(nothing))] c: i32, - | ^ help: if this is intentional, prefix it with an underscore: `_c` - -error: unused variable: `b` - --> $DIR/param-attrs-cfg.rs:67:27 - | -LL | #[cfg(something)] b: i32, - | ^ help: if this is intentional, prefix it with an underscore: `_b` - -error: unused variable: `c` - --> $DIR/param-attrs-cfg.rs:69:44 - | -LL | #[cfg_attr(nothing, cfg(nothing))] c: i32, - | ^ help: if this is intentional, prefix it with an underscore: `_c` - -error: unused variable: `b` - --> $DIR/param-attrs-cfg.rs:75:27 - | -LL | #[cfg(something)] b: i32, - | ^ help: if this is intentional, prefix it with an underscore: `_b` - -error: unused variable: `c` - --> $DIR/param-attrs-cfg.rs:77:44 - | -LL | #[cfg_attr(nothing, cfg(nothing))] c: i32, - | ^ help: if this is intentional, prefix it with an underscore: `_c` - error: unused variable: `a` --> $DIR/param-attrs-cfg.rs:41:27 | @@ -94,6 +52,30 @@ error: unused variable: `c` LL | #[cfg_attr(nothing, cfg(nothing))] c: i32, | ^ help: if this is intentional, prefix it with an underscore: `_c` +error: unused variable: `b` + --> $DIR/param-attrs-cfg.rs:67:27 + | +LL | #[cfg(something)] b: i32, + | ^ help: if this is intentional, prefix it with an underscore: `_b` + +error: unused variable: `c` + --> $DIR/param-attrs-cfg.rs:69:44 + | +LL | #[cfg_attr(nothing, cfg(nothing))] c: i32, + | ^ help: if this is intentional, prefix it with an underscore: `_c` + +error: unused variable: `b` + --> $DIR/param-attrs-cfg.rs:75:27 + | +LL | #[cfg(something)] b: i32, + | ^ help: if this is intentional, prefix it with an underscore: `_b` + +error: unused variable: `c` + --> $DIR/param-attrs-cfg.rs:77:44 + | +LL | #[cfg_attr(nothing, cfg(nothing))] c: i32, + | ^ help: if this is intentional, prefix it with an underscore: `_c` + error: unused variable: `b` --> $DIR/param-attrs-cfg.rs:86:27 | @@ -118,5 +100,23 @@ error: unused variable: `c` LL | #[cfg_attr(nothing, cfg(nothing))] c: i32, | ^ help: if this is intentional, prefix it with an underscore: `_c` +error: unused variable: `a` + --> $DIR/param-attrs-cfg.rs:107:27 + | +LL | #[cfg(something)] a: i32, + | ^ help: if this is intentional, prefix it with an underscore: `_a` + +error: unused variable: `b` + --> $DIR/param-attrs-cfg.rs:113:27 + | +LL | #[cfg(something)] b: i32, + | ^ help: if this is intentional, prefix it with an underscore: `_b` + +error: unused variable: `c` + --> $DIR/param-attrs-cfg.rs:115:44 + | +LL | #[cfg_attr(nothing, cfg(nothing))] c: i32, + | ^ help: if this is intentional, prefix it with an underscore: `_c` + error: aborting due to 19 previous errors diff --git a/src/test/ui/suggestions/sugg_with_positional_args_and_debug_fmt.rs b/src/test/ui/suggestions/sugg_with_positional_args_and_debug_fmt.rs new file mode 100644 index 00000000000..21ab6830b3c --- /dev/null +++ b/src/test/ui/suggestions/sugg_with_positional_args_and_debug_fmt.rs @@ -0,0 +1,10 @@ +// When build the suggesttion take in consideration the `:?` +// https://github.com/rust-lang/rust/issues/100648 +#![deny(warnings)] + +fn main () { + println!("hello {:?}", world = "world"); + //~^ ERROR named argument `world` is not used by name + //~| HELP use the named argument by name to avoid ambiguity + //~| SUGGESTION world +} diff --git a/src/test/ui/suggestions/sugg_with_positional_args_and_debug_fmt.stderr b/src/test/ui/suggestions/sugg_with_positional_args_and_debug_fmt.stderr new file mode 100644 index 00000000000..850f69f2d98 --- /dev/null +++ b/src/test/ui/suggestions/sugg_with_positional_args_and_debug_fmt.stderr @@ -0,0 +1,21 @@ +error: named argument `world` is not used by name + --> $DIR/sugg_with_positional_args_and_debug_fmt.rs:6:28 + | +LL | println!("hello {:?}", world = "world"); + | ---- ^^^^^ this named argument is referred to by position in formatting string + | | + | this formatting argument uses named argument `world` by position + | +note: the lint level is defined here + --> $DIR/sugg_with_positional_args_and_debug_fmt.rs:3:9 + | +LL | #![deny(warnings)] + | ^^^^^^^^ + = note: `#[deny(named_arguments_used_positionally)]` implied by `#[deny(warnings)]` +help: use the named argument by name to avoid ambiguity + | +LL | println!("hello {world:?}", world = "world"); + | +++++ + +error: aborting due to previous error + diff --git a/src/tools/error_index_generator/build.rs b/src/tools/error_index_generator/build.rs deleted file mode 100644 index 70b00b36cf1..00000000000 --- a/src/tools/error_index_generator/build.rs +++ /dev/null @@ -1,31 +0,0 @@ -use std::path::PathBuf; -use std::{env, fs}; -use walkdir::WalkDir; - -fn main() { - // The src directory (we are in src/tools/error_index_generator) - // Note that we could skip one of the .. but this ensures we at least loosely find the right - // directory. - let out_dir = PathBuf::from(env::var("OUT_DIR").unwrap()); - - let error_codes_path = "../../../compiler/rustc_error_codes/src/error_codes.rs"; - - println!("cargo:rerun-if-changed={}", error_codes_path); - let file = fs::read_to_string(error_codes_path) - .unwrap() - .replace(": include_str!(\"./error_codes/", ": include_str!(\"./"); - let contents = format!("(|| {{\n{}\n}})()", file); - fs::write(&out_dir.join("all_error_codes.rs"), &contents).unwrap(); - - // We copy the md files as well to the target directory. - for entry in WalkDir::new("../../../compiler/rustc_error_codes/src/error_codes") { - let entry = entry.unwrap(); - match entry.path().extension() { - Some(s) if s == "md" => {} - _ => continue, - } - println!("cargo:rerun-if-changed={}", entry.path().to_str().unwrap()); - let md_content = fs::read_to_string(entry.path()).unwrap(); - fs::write(&out_dir.join(entry.file_name()), &md_content).unwrap(); - } -} diff --git a/src/tools/error_index_generator/main.rs b/src/tools/error_index_generator/main.rs index 1ce02e48c05..68c46700361 100644 --- a/src/tools/error_index_generator/main.rs +++ b/src/tools/error_index_generator/main.rs @@ -3,11 +3,11 @@ extern crate rustc_driver; extern crate rustc_span; -use std::cell::RefCell; -use std::collections::BTreeMap; +use crate::error_codes::error_codes; + use std::env; use std::error::Error; -use std::fs::File; +use std::fs::{create_dir_all, File}; use std::io::Write; use std::path::Path; use std::path::PathBuf; @@ -16,49 +16,86 @@ use rustc_span::edition::DEFAULT_EDITION; use rustdoc::html::markdown::{ErrorCodes, HeadingOffset, IdMap, Markdown, Playground}; -pub struct ErrorMetadata { - pub description: Option, +macro_rules! register_diagnostics { + ($($error_code:ident: $message:expr,)+ ; $($undocumented:ident,)* ) => { + pub fn error_codes() -> Vec<(&'static str, Option<&'static str>)> { + let mut errors: Vec<(&str, Option<&str>)> = vec![ + $((stringify!($error_code), Some($message)),)+ + $((stringify!($undocumented), None),)+ + ]; + errors.sort(); + errors + } + } } -/// Mapping from error codes to metadata that can be (de)serialized. -pub type ErrorMetadataMap = BTreeMap; +#[path = "../../../compiler/rustc_error_codes/src/error_codes.rs"] +mod error_codes; enum OutputFormat { HTML(HTMLFormatter), - Markdown(MarkdownFormatter), + Markdown, Unknown(String), } impl OutputFormat { fn from(format: &str, resource_suffix: &str) -> OutputFormat { match &*format.to_lowercase() { - "html" => OutputFormat::HTML(HTMLFormatter( - RefCell::new(IdMap::new()), - resource_suffix.to_owned(), - )), - "markdown" => OutputFormat::Markdown(MarkdownFormatter), + "html" => OutputFormat::HTML(HTMLFormatter(resource_suffix.to_owned())), + "markdown" => OutputFormat::Markdown, s => OutputFormat::Unknown(s.to_owned()), } } } -trait Formatter { - fn header(&self, output: &mut dyn Write) -> Result<(), Box>; - fn title(&self, output: &mut dyn Write) -> Result<(), Box>; - fn error_code_block( +struct HTMLFormatter(String); + +impl HTMLFormatter { + fn create_error_code_file( + &self, + err_code: &str, + explanation: &str, + parent_dir: &Path, + ) -> Result<(), Box> { + let mut output_file = File::create(parent_dir.join(err_code).with_extension("html"))?; + + self.header(&mut output_file, "../", "")?; + self.title(&mut output_file, &format!("Error code {}", err_code))?; + + let mut id_map = IdMap::new(); + let playground = + Playground { crate_name: None, url: String::from("https://play.rust-lang.org/") }; + write!( + output_file, + "{}", + Markdown { + content: explanation, + links: &[], + ids: &mut id_map, + error_codes: ErrorCodes::Yes, + edition: DEFAULT_EDITION, + playground: &Some(playground), + heading_offset: HeadingOffset::H1, + } + .into_string() + )?; + write!( + output_file, + "

\ + Back to list of error codes\ +

", + )?; + + self.footer(&mut output_file) + } + + fn header( &self, output: &mut dyn Write, - info: &ErrorMetadata, - err_code: &str, - ) -> Result<(), Box>; - fn footer(&self, output: &mut dyn Write) -> Result<(), Box>; -} - -struct HTMLFormatter(RefCell, String); -struct MarkdownFormatter; - -impl Formatter for HTMLFormatter { - fn header(&self, output: &mut dyn Write) -> Result<(), Box> { + extra_path: &str, + extra: &str, + ) -> Result<(), Box> { write!( output, r##" @@ -67,188 +104,106 @@ impl Formatter for HTMLFormatter { Rust Compiler Error Index - - - + + + +{extra} "##, - suffix = self.1 + suffix = self.0, )?; Ok(()) } - fn title(&self, output: &mut dyn Write) -> Result<(), Box> { - write!(output, "

Rust Compiler Error Index

\n")?; - Ok(()) - } - - fn error_code_block( - &self, - output: &mut dyn Write, - info: &ErrorMetadata, - err_code: &str, - ) -> Result<(), Box> { - // Enclose each error in a div so they can be shown/hidden en masse. - let desc_desc = match info.description { - Some(_) => "error-described", - None => "error-undescribed", - }; - write!(output, "
", desc_desc)?; - - // Error title (with self-link). - write!( - output, - "

{0}

\n", - err_code - )?; - - // Description rendered as markdown. - match info.description { - Some(ref desc) => { - let mut id_map = self.0.borrow_mut(); - let playground = Playground { - crate_name: None, - url: String::from("https://play.rust-lang.org/"), - }; - write!( - output, - "{}", - Markdown { - content: desc, - links: &[], - ids: &mut id_map, - error_codes: ErrorCodes::Yes, - edition: DEFAULT_EDITION, - playground: &Some(playground), - heading_offset: HeadingOffset::H1, - } - .into_string() - )? - } - None => write!(output, "

No description.

\n")?, - } - - write!(output, "
\n")?; + fn title(&self, output: &mut dyn Write, title: &str) -> Result<(), Box> { + write!(output, "

{}

\n", title)?; Ok(()) } fn footer(&self, output: &mut dyn Write) -> Result<(), Box> { - write!( - output, - r##" - -"## - )?; - Ok(()) - } -} - -impl Formatter for MarkdownFormatter { - #[allow(unused_variables)] - fn header(&self, output: &mut dyn Write) -> Result<(), Box> { - Ok(()) - } - - fn title(&self, output: &mut dyn Write) -> Result<(), Box> { - write!(output, "# Rust Compiler Error Index\n")?; - Ok(()) - } - - fn error_code_block( - &self, - output: &mut dyn Write, - info: &ErrorMetadata, - err_code: &str, - ) -> Result<(), Box> { - Ok(match info.description { - Some(ref desc) => write!(output, "## {}\n{}\n", err_code, desc)?, - None => (), - }) - } - - #[allow(unused_variables)] - fn footer(&self, output: &mut dyn Write) -> Result<(), Box> { + write!(output, "")?; Ok(()) } } /// Output an HTML page for the errors in `err_map` to `output_path`. -fn render_error_page( - err_map: &ErrorMetadataMap, - output_path: &Path, - formatter: T, -) -> Result<(), Box> { +fn render_markdown(output_path: &Path) -> Result<(), Box> { let mut output_file = File::create(output_path)?; - formatter.header(&mut output_file)?; - formatter.title(&mut output_file)?; + write!(output_file, "# Rust Compiler Error Index\n")?; - for (err_code, info) in err_map { - formatter.error_code_block(&mut output_file, info, err_code)?; + for (err_code, description) in error_codes().iter() { + match description { + Some(ref desc) => write!(output_file, "## {}\n{}\n", err_code, desc)?, + None => {} + } } + Ok(()) +} + +fn render_html(output_path: &Path, formatter: HTMLFormatter) -> Result<(), Box> { + let mut output_file = File::create(output_path)?; + + let error_codes_dir = "error_codes"; + + let parent = output_path.parent().expect("There should have a parent").join(error_codes_dir); + + if !parent.exists() { + create_dir_all(&parent)?; + } + + formatter.header( + &mut output_file, + "", + &format!( + r#""# + ), + )?; + formatter.title(&mut output_file, "Rust Compiler Error Index")?; + + write!( + output_file, + "

This page lists all the error codes emitted by the Rust compiler. If you want a full \ + explanation on an error code, click on it.

\ +
    ", + )?; + for (err_code, explanation) in error_codes().iter() { + if let Some(explanation) = explanation { + write!( + output_file, + "
  • {1}
  • ", + error_codes_dir, err_code + )?; + formatter.create_error_code_file(err_code, explanation, &parent)?; + } else { + write!(output_file, "
  • {}
  • ", err_code)?; + } + } + write!(output_file, "
")?; formatter.footer(&mut output_file) } fn main_with_result(format: OutputFormat, dst: &Path) -> Result<(), Box> { - let long_codes = register_all(); - let mut err_map = BTreeMap::new(); - for (code, desc) in long_codes { - err_map.insert(code.to_string(), ErrorMetadata { description: desc.map(String::from) }); - } match format { OutputFormat::Unknown(s) => panic!("Unknown output format: {}", s), - OutputFormat::HTML(h) => render_error_page(&err_map, dst, h)?, - OutputFormat::Markdown(m) => render_error_page(&err_map, dst, m)?, + OutputFormat::HTML(h) => render_html(dst, h), + OutputFormat::Markdown => render_markdown(dst), } - Ok(()) } fn parse_args() -> (OutputFormat, PathBuf) { @@ -261,7 +216,7 @@ fn parse_args() -> (OutputFormat, PathBuf) { .unwrap_or(OutputFormat::from("html", &resource_suffix)); let dst = dst.map(PathBuf::from).unwrap_or_else(|| match format { OutputFormat::HTML(..) => PathBuf::from("doc/error-index.html"), - OutputFormat::Markdown(..) => PathBuf::from("doc/error-index.md"), + OutputFormat::Markdown => PathBuf::from("doc/error-index.md"), OutputFormat::Unknown(..) => PathBuf::from(""), }); (format, dst) @@ -276,23 +231,3 @@ fn main() { panic!("{}", e.to_string()); } } - -fn register_all() -> Vec<(&'static str, Option<&'static str>)> { - let mut long_codes: Vec<(&'static str, Option<&'static str>)> = Vec::new(); - macro_rules! register_diagnostics { - ($($ecode:ident: $message:expr,)* ; $($code:ident,)*) => ( - $( - {long_codes.extend([ - (stringify!($ecode), Some($message)), - ].iter());} - )* - $( - {long_codes.extend([ - stringify!($code), - ].iter().cloned().map(|s| (s, None)).collect::>());} - )* - ) - } - include!(concat!(env!("OUT_DIR"), "/all_error_codes.rs")); - long_codes -}