-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove some usage of DUMMY_HIR_ID
#71069
Changes from all commits
812854c
b4edda9
502ae0e
0634789
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,7 +31,7 @@ use rustc_middle::middle::region; | |
use rustc_middle::ty::fold::TypeFoldable; | ||
use rustc_middle::ty::subst::{InternalSubsts, SubstsRef}; | ||
use rustc_middle::ty::{self, GenericParamDefKind, ToPredicate, Ty, TyCtxt, WithConstness}; | ||
use rustc_span::{Span, DUMMY_SP}; | ||
use rustc_span::Span; | ||
|
||
use std::fmt::Debug; | ||
|
||
|
@@ -136,7 +136,7 @@ pub fn type_known_to_meet_bound_modulo_regions<'a, 'tcx>( | |
let trait_ref = ty::TraitRef { def_id, substs: infcx.tcx.mk_substs_trait(ty, &[]) }; | ||
let obligation = Obligation { | ||
param_env, | ||
cause: ObligationCause::misc(span, hir::DUMMY_HIR_ID), | ||
cause: ObligationCause::misc(span, hir::CRATE_HIR_ID), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. cc @nikomatsakis Is this a good way to encode this? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh this is what There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, i just "copied" what was done in |
||
recursion_depth: 0, | ||
predicate: trait_ref.without_const().to_predicate(), | ||
}; | ||
|
@@ -163,7 +163,7 @@ pub fn type_known_to_meet_bound_modulo_regions<'a, 'tcx>( | |
// We can use a dummy node-id here because we won't pay any mind | ||
// to region obligations that arise (there shouldn't really be any | ||
// anyhow). | ||
let cause = ObligationCause::misc(span, hir::DUMMY_HIR_ID); | ||
let cause = ObligationCause::misc(span, hir::CRATE_HIR_ID); | ||
|
||
fulfill_cx.register_bound(infcx, param_env, ty, def_id, cause); | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Heh this is a bugfix (
#[allow]
& friends will now work correctly).