Skip to content
Permalink
Browse files

Run `rustfmt --file-lines ...` for changes from previous commits.

  • Loading branch information...
eddyb committed Jun 13, 2019
1 parent f3f9d6d commit afc39bbf2447844569e872468f9440d430b81a46
Showing with 813 additions and 1,159 deletions.
  1. +5 −5 src/librustc/ich/impls_syntax.rs
  2. +16 −10 src/librustc/ich/impls_ty.rs
  3. +11 −16 src/librustc/infer/at.rs
  4. +2 −3 src/librustc/infer/canonical/query_response.rs
  5. +4 −3 src/librustc/infer/equate.rs
  6. +2 −3 src/librustc/infer/error_reporting/need_type_info.rs
  7. +1 −2 src/librustc/infer/freshen.rs
  8. +5 −6 src/librustc/infer/glb.rs
  9. +8 −5 src/librustc/infer/lattice.rs
  10. +12 −10 src/librustc/infer/lexical_region_resolve/graphviz.rs
  11. +1 −4 src/librustc/infer/lexical_region_resolve/mod.rs
  12. +5 −6 src/librustc/infer/lub.rs
  13. +2 −5 src/librustc/infer/outlives/env.rs
  14. +4 −4 src/librustc/infer/resolve.rs
  15. +4 −3 src/librustc/infer/sub.rs
  16. +1 −4 src/librustc/lint/context.rs
  17. +1 −4 src/librustc/middle/entry.rs
  18. +1 −5 src/librustc/middle/exported_symbols.rs
  19. +14 −14 src/librustc/middle/expr_use_visitor.rs
  20. +11 −9 src/librustc/middle/mem_categorization.rs
  21. +1 −5 src/librustc/middle/region.rs
  22. +1 −6 src/librustc/middle/resolve_lifetime.rs
  23. +1 −6 src/librustc/mir/tcx.rs
  24. +1 −1 src/librustc/traits/chalk_fulfill.rs
  25. +8 −6 src/librustc/traits/codegen/mod.rs
  26. +5 −5 src/librustc/traits/coherence.rs
  27. +2 −5 src/librustc/traits/error_reporting.rs
  28. +27 −24 src/librustc/traits/fulfill.rs
  29. +4 −3 src/librustc/traits/mod.rs
  30. +73 −86 src/librustc/traits/project.rs
  31. +1 −3 src/librustc/traits/query/type_op/mod.rs
  32. +13 −11 src/librustc/traits/specialize/mod.rs
  33. +1 −6 src/librustc/traits/specialize/specialization_graph.rs
  34. +8 −15 src/librustc/traits/util.rs
  35. +1 −5 src/librustc/ty/adjustment.rs
  36. +21 −23 src/librustc/ty/context.rs
  37. +1 −6 src/librustc/ty/fold.rs
  38. +11 −8 src/librustc/ty/layout.rs
  39. +8 −24 src/librustc/ty/mod.rs
  40. +1 −3 src/librustc/ty/print/mod.rs
  41. +1 −5 src/librustc/ty/print/obsolete.rs
  42. +22 −30 src/librustc/ty/print/pretty.rs
  43. +1 −5 src/librustc/ty/query/job.rs
  44. +1 −5 src/librustc/ty/query/on_disk_cache.rs
  45. +7 −21 src/librustc/ty/query/plumbing.rs
  46. +2 −2 src/librustc/ty/structural_impls.rs
  47. +3 −15 src/librustc/ty/sty.rs
  48. +3 −18 src/librustc/ty/subst.rs
  49. +4 −19 src/librustc/ty/util.rs
  50. +21 −21 src/librustc/ty/wf.rs
  51. +1 −5 src/librustc_codegen_llvm/lib.rs
  52. +1 −6 src/librustc_codegen_ssa/debuginfo/type_names.rs
  53. +3 −5 src/librustc_codegen_utils/symbol_names/legacy.rs
  54. +1 −5 src/librustc_incremental/assert_dep_graph.rs
  55. +1 −1 src/librustc_interface/passes.rs
  56. +4 −15 src/librustc_metadata/decoder.rs
  57. +7 −16 src/librustc_mir/borrow_check/mod.rs
  58. +1 −6 src/librustc_mir/borrow_check/nll/region_infer/error_reporting/var_name.rs
  59. +1 −4 src/librustc_mir/borrow_check/nll/renumber.rs
  60. +1 −3 src/librustc_mir/borrow_check/nll/type_check/constraint_conversion.rs
  61. +1 −6 src/librustc_mir/borrow_check/prefixes.rs
  62. +4 −21 src/librustc_mir/dataflow/impls/mod.rs
  63. +1 −2 src/librustc_mir/hair/cx/mod.rs
  64. +3 −5 src/librustc_mir/interpret/intrinsics/type_name.rs
  65. +2 −9 src/librustc_mir/monomorphize/collector.rs
  66. +1 −4 src/librustc_mir/monomorphize/partitioning.rs
  67. +1 −5 src/librustc_mir/shim.rs
  68. +1 −6 src/librustc_mir/transform/add_call_guards.rs
  69. +1 −5 src/librustc_mir/transform/add_moves_for_packed_drops.rs
  70. +1 −6 src/librustc_mir/transform/add_retag.rs
  71. +1 −6 src/librustc_mir/transform/cleanup_post_borrowck.rs
  72. +1 −6 src/librustc_mir/transform/const_prop.rs
  73. +1 −6 src/librustc_mir/transform/copy_prop.rs
  74. +1 −6 src/librustc_mir/transform/deaggregator.rs
  75. +1 −6 src/librustc_mir/transform/dump_mir.rs
  76. +1 −6 src/librustc_mir/transform/generator.rs
  77. +1 −6 src/librustc_mir/transform/inline.rs
  78. +1 −6 src/librustc_mir/transform/lower_128bit.rs
  79. +1 −6 src/librustc_mir/transform/mod.rs
  80. +1 −6 src/librustc_mir/transform/remove_noop_landing_pads.rs
  81. +1 −6 src/librustc_mir/transform/simplify.rs
  82. +1 −6 src/librustc_mir/transform/simplify_branches.rs
  83. +2 −12 src/librustc_mir/transform/uniform_array_move_out.rs
  84. +1 −4 src/librustc_mir/util/mod.rs
  85. +2 −10 src/librustc_mir/util/pretty.rs
  86. +1 −5 src/librustc_privacy/lib.rs
  87. +5 −10 src/librustc_traits/chalk_context/mod.rs
  88. +1 −4 src/librustc_traits/chalk_context/program_clauses/primitive.rs
  89. +2 −5 src/librustc_traits/chalk_context/unify.rs
  90. +1 −1 src/librustc_traits/implied_outlives_bounds.rs
  91. +1 −2 src/librustc_typeck/check/_match.rs
  92. +15 −17 src/librustc_typeck/check/autoderef.rs
  93. +42 −35 src/librustc_typeck/check/cast.rs
  94. +28 −23 src/librustc_typeck/check/coercion.rs
  95. +10 −9 src/librustc_typeck/check/compare_method.rs
  96. +1 −4 src/librustc_typeck/check/dropck.rs
  97. +6 −4 src/librustc_typeck/check/generator_interior.rs
  98. +8 −9 src/librustc_typeck/check/method/confirm.rs
  99. +16 −14 src/librustc_typeck/check/method/mod.rs
  100. +41 −36 src/librustc_typeck/check/method/probe.rs
  101. +165 −150 src/librustc_typeck/check/mod.rs
  102. +36 −34 src/librustc_typeck/check/op.rs
  103. +9 −19 src/librustc_typeck/check/wfcheck.rs
  104. +2 −10 src/librustc_typeck/coherence/mod.rs
  105. +3 −14 src/librustc_typeck/collect.rs
  106. +1 −4 src/librustc_typeck/impl_wf_check.rs
  107. +1 −4 src/librustc_typeck/variance/mod.rs
@@ -506,12 +506,12 @@ fn stable_non_narrow_char(swc: ::syntax_pos::NonNarrowChar,
(pos.0 - source_file_start.0, width as u32)
}



impl<'tcx> HashStable<StableHashingContext<'tcx>> for feature_gate::Features {
fn hash_stable<W: StableHasherResult>(&self,
hcx: &mut StableHashingContext<'tcx>,
hasher: &mut StableHasher<W>) {
fn hash_stable<W: StableHasherResult>(
&self,
hcx: &mut StableHashingContext<'tcx>,
hasher: &mut StableHasher<W>,
) {
// Unfortunately we cannot exhaustively list fields here, since the
// struct is macro generated.
self.declared_lang_features.hash_stable(hcx, hasher);
@@ -11,9 +11,10 @@ use crate::middle::region;
use crate::ty;
use crate::mir;

impl<'a, 'tcx, T> HashStable<StableHashingContext<'a>>
for &'tcx ty::List<T>
where T: HashStable<StableHashingContext<'a>> {
impl<'a, 'tcx, T> HashStable<StableHashingContext<'a>> for &'tcx ty::List<T>
where
T: HashStable<StableHashingContext<'a>>,
{
fn hash_stable<W: StableHasherResult>(&self,
hcx: &mut StableHashingContext<'a>,
hasher: &mut StableHasher<W>) {
@@ -41,7 +42,8 @@ for &'tcx ty::List<T>
}

impl<'a, 'tcx, T> ToStableHashKey<StableHashingContext<'a>> for &'tcx ty::List<T>
where T: HashStable<StableHashingContext<'a>>
where
T: HashStable<StableHashingContext<'a>>,
{
type KeyType = Fingerprint;

@@ -119,18 +121,22 @@ impl<'a> HashStable<StableHashingContext<'a>> for ty::RegionVid {

impl<'a, 'tcx> HashStable<StableHashingContext<'a>> for ty::ConstVid<'tcx> {
#[inline]
fn hash_stable<W: StableHasherResult>(&self,
hcx: &mut StableHashingContext<'a>,
hasher: &mut StableHasher<W>) {
fn hash_stable<W: StableHasherResult>(
&self,
hcx: &mut StableHashingContext<'a>,
hasher: &mut StableHasher<W>,
) {
self.index.hash_stable(hcx, hasher);
}
}

impl<'tcx> HashStable<StableHashingContext<'tcx>> for ty::BoundVar {
#[inline]
fn hash_stable<W: StableHasherResult>(&self,
hcx: &mut StableHashingContext<'tcx>,
hasher: &mut StableHasher<W>) {
fn hash_stable<W: StableHasherResult>(
&self,
hcx: &mut StableHashingContext<'tcx>,
hasher: &mut StableHasher<W>,
) {
self.index().hash_stable(hcx, hasher);
}
}
@@ -44,11 +44,11 @@ pub struct Trace<'a, 'tcx: 'a> {

impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
#[inline]
pub fn at(&'a self,
cause: &'a ObligationCause<'tcx>,
param_env: ty::ParamEnv<'tcx>)
-> At<'a, 'tcx>
{
pub fn at(
&'a self,
cause: &'a ObligationCause<'tcx>,
param_env: ty::ParamEnv<'tcx>,
) -> At<'a, 'tcx> {
At { infcx: self, cause, param_env }
}
}
@@ -186,24 +186,19 @@ impl<'a, 'tcx> At<'a, 'tcx> {
/// error-reporting, but doesn't actually perform any operation
/// yet (this is useful when you want to set the trace using
/// distinct values from those you wish to operate upon).
pub fn trace<T>(self,
expected: T,
actual: T)
-> Trace<'a, 'tcx>
where T: ToTrace<'tcx>
pub fn trace<T>(self, expected: T, actual: T) -> Trace<'a, 'tcx>
where
T: ToTrace<'tcx>,
{
self.trace_exp(true, expected, actual)
}

/// Like `trace`, but the expected value is determined by the
/// boolean argument (if true, then the first argument `a` is the
/// "expected" value).
pub fn trace_exp<T>(self,
a_is_expected: bool,
a: T,
b: T)
-> Trace<'a, 'tcx>
where T: ToTrace<'tcx>
pub fn trace_exp<T>(self, a_is_expected: bool, a: T, b: T) -> Trace<'a, 'tcx>
where
T: ToTrace<'tcx>,
{
let trace = ToTrace::to_trace(self.cause, a_is_expected, a, b);
Trace { at: self, trace: trace, a_is_expected }
@@ -49,8 +49,7 @@ impl<'tcx> InferCtxtBuilder<'tcx> {
pub fn enter_canonical_trait_query<K, R>(
&mut self,
canonical_key: &Canonical<'tcx, K>,
operation: impl FnOnce(&InferCtxt<'_, 'tcx>, &mut dyn TraitEngine<'tcx>, K)
-> Fallible<R>,
operation: impl FnOnce(&InferCtxt<'_, 'tcx>, &mut dyn TraitEngine<'tcx>, K) -> Fallible<R>,
) -> Fallible<CanonicalizedQueryResponse<'tcx, R>>
where
K: TypeFoldable<'tcx>,
@@ -126,7 +125,7 @@ impl<'cx, 'tcx> InferCtxt<'cx, 'tcx> {
pub fn make_query_response_ignoring_pending_obligations<T>(
&self,
inference_vars: CanonicalVarValues<'tcx>,
answer: T
answer: T,
) -> Canonical<'tcx, QueryResponse<'tcx, <T as Lift<'tcx>>::Lifted>>
where
T: Debug + Lift<'tcx> + TypeFoldable<'tcx>,
@@ -17,9 +17,10 @@ pub struct Equate<'combine, 'infcx: 'combine, 'tcx: 'infcx> {
}

impl<'combine, 'infcx, 'tcx> Equate<'combine, 'infcx, 'tcx> {
pub fn new(fields: &'combine mut CombineFields<'infcx, 'tcx>, a_is_expected: bool)
-> Equate<'combine, 'infcx, 'tcx>
{
pub fn new(
fields: &'combine mut CombineFields<'infcx, 'tcx>,
a_is_expected: bool,
) -> Equate<'combine, 'infcx, 'tcx> {
Equate { fields: fields, a_is_expected: a_is_expected }
}
}
@@ -74,7 +74,6 @@ impl<'a, 'tcx> Visitor<'tcx> for FindLocalByTypeVisitor<'a, 'tcx> {
}
}


impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
pub fn extract_type_name(
&self,
@@ -102,7 +101,7 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
&self,
body_id: Option<hir::BodyId>,
span: Span,
ty: Ty<'tcx>
ty: Ty<'tcx>,
) -> DiagnosticBuilder<'tcx> {
let ty = self.resolve_vars_if_possible(&ty);
let name = self.extract_type_name(&ty, None);
@@ -229,7 +228,7 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
pub fn need_type_info_err_in_generator(
&self,
span: Span,
ty: Ty<'tcx>
ty: Ty<'tcx>,
) -> DiagnosticBuilder<'tcx> {
let ty = self.resolve_vars_if_possible(&ty);
let name = self.extract_type_name(&ty, None);
@@ -50,8 +50,7 @@ pub struct TypeFreshener<'a, 'tcx: 'a> {
}

impl<'a, 'tcx> TypeFreshener<'a, 'tcx> {
pub fn new(infcx: &'a InferCtxt<'a, 'tcx>)
-> TypeFreshener<'a, 'tcx> {
pub fn new(infcx: &'a InferCtxt<'a, 'tcx>) -> TypeFreshener<'a, 'tcx> {
TypeFreshener {
infcx,
ty_freshen_count: 0,
@@ -14,9 +14,10 @@ pub struct Glb<'combine, 'infcx: 'combine, 'tcx: 'infcx> {
}

impl<'combine, 'infcx, 'tcx> Glb<'combine, 'infcx, 'tcx> {
pub fn new(fields: &'combine mut CombineFields<'infcx, 'tcx>, a_is_expected: bool)
-> Glb<'combine, 'infcx, 'tcx>
{
pub fn new(
fields: &'combine mut CombineFields<'infcx, 'tcx>,
a_is_expected: bool,
) -> Glb<'combine, 'infcx, 'tcx> {
Glb { fields: fields, a_is_expected: a_is_expected }
}
}
@@ -85,9 +86,7 @@ impl TypeRelation<'tcx> for Glb<'combine, 'infcx, 'tcx> {
}
}

impl<'combine, 'infcx, 'tcx> LatticeDir<'infcx, 'tcx>
for Glb<'combine, 'infcx, 'tcx>
{
impl<'combine, 'infcx, 'tcx> LatticeDir<'infcx, 'tcx> for Glb<'combine, 'infcx, 'tcx> {
fn infcx(&self) -> &'infcx InferCtxt<'infcx, 'tcx> {
self.fields.infcx
}
@@ -41,11 +41,14 @@ pub trait LatticeDir<'f, 'tcx: 'f>: TypeRelation<'tcx> {
fn relate_bound(&mut self, v: Ty<'tcx>, a: Ty<'tcx>, b: Ty<'tcx>) -> RelateResult<'tcx, ()>;
}

pub fn super_lattice_tys<'a, 'tcx, L>(this: &mut L,
a: Ty<'tcx>,
b: Ty<'tcx>)
-> RelateResult<'tcx, Ty<'tcx>>
where L: LatticeDir<'a, 'tcx>, 'tcx: 'a
pub fn super_lattice_tys<'a, 'tcx, L>(
this: &mut L,
a: Ty<'tcx>,
b: Ty<'tcx>,
) -> RelateResult<'tcx, Ty<'tcx>>
where
L: LatticeDir<'a, 'tcx>,
'tcx: 'a,
{
debug!("{}.lattice_tys({:?}, {:?})",
this.tag(),
@@ -46,8 +46,8 @@ graphs will be printed. \n\

pub fn maybe_print_constraints_for<'a, 'tcx>(
region_data: &RegionConstraintData<'tcx>,
region_rels: &RegionRelations<'a, 'tcx>)
{
region_rels: &RegionRelations<'a, 'tcx>,
) {
let tcx = region_rels.tcx;
let context = region_rels.context;

@@ -127,10 +127,11 @@ enum Edge<'tcx> {
}

impl<'a, 'tcx> ConstraintGraph<'a, 'tcx> {
fn new(name: String,
region_rels: &'a RegionRelations<'a, 'tcx>,
map: &'a ConstraintMap<'tcx>)
-> ConstraintGraph<'a, 'tcx> {
fn new(
name: String,
region_rels: &'a RegionRelations<'a, 'tcx>,
map: &'a ConstraintMap<'tcx>,
) -> ConstraintGraph<'a, 'tcx> {
let mut i = 0;
let mut node_ids = FxHashMap::default();
{
@@ -246,10 +247,11 @@ impl<'a, 'tcx> dot::GraphWalk<'a> for ConstraintGraph<'a, 'tcx> {

pub type ConstraintMap<'tcx> = BTreeMap<Constraint<'tcx>, SubregionOrigin<'tcx>>;

fn dump_region_data_to<'a, 'tcx>(region_rels: &RegionRelations<'a, 'tcx>,
map: &ConstraintMap<'tcx>,
path: &str)
-> io::Result<()> {
fn dump_region_data_to<'a, 'tcx>(
region_rels: &RegionRelations<'a, 'tcx>,
map: &ConstraintMap<'tcx>,
path: &str,
) -> io::Result<()> {
debug!("dump_region_data map (len: {}) path: {}",
map.len(),
path);
@@ -33,10 +33,7 @@ pub fn resolve<'tcx>(
region_rels: &RegionRelations<'_, 'tcx>,
var_infos: VarInfos,
data: RegionConstraintData<'tcx>,
) -> (
LexicalRegionResolutions<'tcx>,
Vec<RegionResolutionError<'tcx>>,
) {
) -> (LexicalRegionResolutions<'tcx>, Vec<RegionResolutionError<'tcx>>) {
debug!("RegionConstraintData: resolve_regions()");
let mut errors = vec![];
let mut resolver = LexicalResolver {
@@ -14,9 +14,10 @@ pub struct Lub<'combine, 'infcx: 'combine, 'tcx: 'infcx> {
}

impl<'combine, 'infcx, 'tcx> Lub<'combine, 'infcx, 'tcx> {
pub fn new(fields: &'combine mut CombineFields<'infcx, 'tcx>, a_is_expected: bool)
-> Lub<'combine, 'infcx, 'tcx>
{
pub fn new(
fields: &'combine mut CombineFields<'infcx, 'tcx>,
a_is_expected: bool,
) -> Lub<'combine, 'infcx, 'tcx> {
Lub { fields: fields, a_is_expected: a_is_expected }
}
}
@@ -85,9 +86,7 @@ impl TypeRelation<'tcx> for Lub<'combine, 'infcx, 'tcx> {
}
}

impl<'combine, 'infcx, 'tcx> LatticeDir<'infcx, 'tcx>
for Lub<'combine, 'infcx, 'tcx>
{
impl<'combine, 'infcx, 'tcx> LatticeDir<'infcx, 'tcx> for Lub<'combine, 'infcx, 'tcx> {
fn infcx(&self) -> &'infcx InferCtxt<'infcx, 'tcx> {
self.fields.infcx
}
@@ -190,11 +190,8 @@ impl<'a, 'tcx: 'a> OutlivesEnvironment<'tcx> {
/// contain inference variables, it must be supplied, in which
/// case we will register "givens" on the inference context. (See
/// `RegionConstraintData`.)
fn add_outlives_bounds<I>(
&mut self,
infcx: Option<&InferCtxt<'a, 'tcx>>,
outlives_bounds: I,
) where
fn add_outlives_bounds<I>(&mut self, infcx: Option<&InferCtxt<'a, 'tcx>>, outlives_bounds: I)
where
I: IntoIterator<Item = OutlivesBound<'tcx>>,
{
// Record relationships such as `T:'x` that don't go into the
@@ -105,7 +105,7 @@ pub struct UnresolvedTypeFinder<'a, 'tcx: 'a> {
infcx: &'a InferCtxt<'a, 'tcx>,

/// Used to find the type parameter name and location for error reporting.
pub first_unresolved: Option<(Ty<'tcx>,Option<Span>)>,
pub first_unresolved: Option<(Ty<'tcx>, Option<Span>)>,
}

impl<'a, 'tcx> UnresolvedTypeFinder<'a, 'tcx> {
@@ -157,9 +157,9 @@ impl<'a, 'tcx> TypeVisitor<'tcx> for UnresolvedTypeFinder<'a, 'tcx> {
/// Full type resolution replaces all type and region variables with
/// their concrete results. If any variable cannot be replaced (never unified, etc)
/// then an `Err` result is returned.
pub fn fully_resolve<'a, 'tcx, T>(infcx: &InferCtxt<'a, 'tcx>,
value: &T) -> FixupResult<'tcx, T>
where T : TypeFoldable<'tcx>
pub fn fully_resolve<'a, 'tcx, T>(infcx: &InferCtxt<'a, 'tcx>, value: &T) -> FixupResult<'tcx, T>
where
T: TypeFoldable<'tcx>,
{
let mut full_resolver = FullTypeResolver { infcx: infcx, err: None };
let result = value.fold_with(&mut full_resolver);
@@ -17,9 +17,10 @@ pub struct Sub<'combine, 'infcx: 'combine, 'tcx: 'infcx> {
}

impl<'combine, 'infcx, 'tcx> Sub<'combine, 'infcx, 'tcx> {
pub fn new(f: &'combine mut CombineFields<'infcx, 'tcx>, a_is_expected: bool)
-> Sub<'combine, 'infcx, 'tcx>
{
pub fn new(
f: &'combine mut CombineFields<'infcx, 'tcx>,
a_is_expected: bool,
) -> Sub<'combine, 'infcx, 'tcx> {
Sub { fields: f, a_is_expected: a_is_expected }
}

@@ -1456,10 +1456,7 @@ fn late_lint_pass_crate<'tcx, T: for<'a> LateLintPass<'a, 'tcx>>(tcx: TyCtxt<'tc
})
}

fn late_lint_crate<'tcx, T: for<'a> LateLintPass<'a, 'tcx>>(
tcx: TyCtxt<'tcx>,
builtin_lints: T,
) {
fn late_lint_crate<'tcx, T: for<'a> LateLintPass<'a, 'tcx>>(tcx: TyCtxt<'tcx>, builtin_lints: T) {
let mut passes = tcx.sess.lint_store.borrow().late_passes.lock().take().unwrap();

if !tcx.sess.opts.debugging_opts.no_interleave_lints {
@@ -140,10 +140,7 @@ fn find_item(item: &Item, ctxt: &mut EntryContext<'_, '_>, at_root: bool) {
}
}

fn configure_main(
tcx: TyCtxt<'_>,
visitor: &EntryContext<'_, '_>,
) -> Option<(DefId, EntryFnType)> {
fn configure_main(tcx: TyCtxt<'_>, visitor: &EntryContext<'_, '_>) -> Option<(DefId, EntryFnType)> {
if let Some((hir_id, _)) = visitor.start_fn {
Some((tcx.hir().local_def_id_from_hir_id(hir_id), EntryFnType::Start))
} else if let Some((hir_id, _)) = visitor.attr_main_fn {
@@ -52,11 +52,7 @@ impl<'tcx> ExportedSymbol<'tcx> {
}
}

pub fn compare_stable(
&self,
tcx: TyCtxt<'tcx>,
other: &ExportedSymbol<'tcx>,
) -> cmp::Ordering {
pub fn compare_stable(&self, tcx: TyCtxt<'tcx>, other: &ExportedSymbol<'tcx>) -> cmp::Ordering {
match *self {
ExportedSymbol::NonGeneric(self_def_id) => match *other {
ExportedSymbol::NonGeneric(other_def_id) => {

0 comments on commit afc39bb

Please sign in to comment.
You can’t perform that action at this time.