8000 Rollup of 14 pull requests by Centril · Pull Request #64864 · rust-lang/rust · GitHub
[go: up one dir, main page]

Skip to content

Rollup of 14 pull requests #64864

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

Merged
merged 36 commits into from
Sep 28, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
9b00e21
Remove unused DepTrackingMap
Mark-Simulacrum Sep 26, 2019
dd38a0f
update rtpSpawn's parameters type(It's prototype has been updated in …
bpangWR Sep 26, 2019
3e4f582
Upgrade env_logger to 0.7
mati865 Sep 26, 2019
377a70d
Fix div_duration() marked as stable by mistake
JMS55 Sep 26, 2019
e79036d
hir: Disallow `target_feature` on constants
davidtwco Sep 26, 2019
c81d359
Merge pull request #30 from Wind-River/update
n-salim Sep 26, 2019
c3368bd
hir: stop checking codegen fn attrs for constants
davidtwco Sep 26, 2019
821ff46
Include message on tests that should panic
kungfukennyg Sep 24, 2019
9ef6edb
lowering: don't .abort_if_errors()
Centril Sep 27, 2019
c482c84
Stabilize map_get_key_value feature
tesuji Sep 27, 2019
bd995c0
pin.rs: fix links to primitives in documentation
Sep 27, 2019
faee8e1
Turn `walk_parent_nodes` method into an iterator
estebank Sep 26, 2019
46a38dc
Account for tail expressions when pointing at return type
estebank Sep 26, 2019
e537d06
review comments
estebank Sep 26, 2019
a284822
fix rebase
estebank Sep 27, 2019
d559b72
Add mailmap entry for Dustin Bensing by request
Mark-Simulacrum Sep 27, 2019
d540d44
Remove global_tcx from TyCtxt
Mark-Simulacrum Sep 25, 2019
f226ab4
Remove lift_to_global
Mark-Simulacrum Sep 25, 2019
0a4d55d
Remove stray uses of gcx name
Mark-Simulacrum Sep 25, 2019
4b23503
Remove shrink_to_tcx_lifetime
Mark-Simulacrum Sep 25, 2019
6ccb7ae
Docs: slice elements are equidistant
llogiq Sep 23, 2019
aa03f1f
Improve diagnostic for `let A = 0;`
Centril Sep 28, 2019
4c57882
Rollup merge of #64703 - llogiq:slices-elems-are-equidistant, r=rkruppe
Centril Sep 28, 2019
a60ac8e
Rollup merge of #64745 - kennethbgoodin:should-panic-msg, r=varkor
Centril Sep 28, 2019
4db233e
Rollup merge of #64781 - Mark-Simulacrum:no-global-tcx, r=eddyb
Centril Sep 28, 2019
85175b7
Rollup merge of #64794 - Mark-Simulacrum:rm-dep-track-map, r=estebank
Centril Sep 28, 2019
5b6a580
Rollup merge of #64802 - estebank:walk-parents-iterator, r=matthewjasper
Centril Sep 28, 2019
00cba5b
Rollup merge of #64809 - davidtwco:issue-64768-target-feature-const, …
Centril Sep 28, 2019
e2823c9
Rollup merge of #64815 - JMS55:patch-1, r=jonas-schievink
Centril Sep 28, 2019
2d4c101
Rollup merge of #64818 - Wind-River:master, r=alexcrichton
Centril Sep 28, 2019
fc53088
Rollup merge of #64830 - Centril:thou-shallt-not-abort, r=estebank
Centril Sep 28, 2019
494a8a8
Rollup merge of #64836 - lzutao:stabilize-map_get_key_value, r=SimonS…
Centril Sep 28, 2019
b71f6d8
Rollup merge of #64845 - rusty-snake:patch-1, r=jonas-schievink
Centril Sep 28, 2019
e3a5179
Rollup merge of #64847 - mati865:env_logger, r=alexcrichton
Centril Sep 28, 2019
f1a5bc5
Rollup merge of #64851 - Mark-Simulacrum:mailmap-update, r=varkor
Centril Sep 28, 2019
017944c
Rollup merge of #64859 - Centril:const-def-here-new-var, r=estebank
Centril Sep 28, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove lift_to_global
  • Loading branch information
Mark-Simulacrum committed Sep 27, 2019
commit f226ab4ad97fbc2e183d319616f17998c66f64e8
2 changes: 1 addition & 1 deletion src/librustc/mir/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1504,7 +1504,7 @@ impl<'tcx> TerminatorKind<'tcx> {
Goto { .. } => vec!["".into()],
SwitchInt { ref values, switch_ty, .. } => ty::tls::with(|tcx| {
let param_env = ty::ParamEnv::empty();
let switch_ty = tcx.lift_to_global(&switch_ty).unwrap();
let switch_ty = tcx.lift(&switch_ty).unwrap();
let size = tcx.layout_of(param_env.and(switch_ty)).unwrap().size;
values
.iter()
Expand Down
5 changes: 0 additions & 5 deletions src/librustc/ty/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1148,11 +1148,6 @@ impl<'tcx> TyCtxt<'tcx> {
value.lift_to_tcx(self)
}

/// Like lift, but only tries in the global tcx.
pub fn lift_to_global<T: ?Sized + Lift<'tcx>>(self, value: &T) -> Option<T::Lifted> {
value.lift_to_tcx(self)
}

/// Creates a type context and call the closure with a `TyCtxt` reference
/// to the context. The closure enforces that the type context and any interned
/// value (types, substs, etc.) can only be used while `ty::tls` has a valid
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/ty/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ impl<'tcx> ty::TyS<'tcx> {
ty::Adt(def, _) => format!("{} `{}`", def.descr(), tcx.def_path_str(def.did)).into(),
ty::Foreign(def_id) => format!("extern type `{}`", tcx.def_path_str(def_id)).into(),
ty::Array(_, n) => {
let n = tcx.lift_to_global(&n).unwrap();
let n = tcx.lift(&n).unwrap();
match n.try_eval_usize(tcx, ty::ParamEnv::empty()) {
Some(n) => {
format!("array of {} element{}", n, pluralise!(n)).into()
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/ty/print/pretty.rs
Original file line number Diff line number Diff line change
Expand Up @@ -917,7 +917,7 @@ pub trait PrettyPrinter<'tcx>:
let min = 1u128 << (bit_size - 1);
let max = min - 1;

let ty = self.tcx().lift_to_global(&ct.ty).unwrap();
let ty = self.tcx().lift(&ct.ty).unwrap();
let size = self.tcx().layout_of(ty::ParamEnv::empty().and(ty))
.unwrap()
.size;
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_mir/borrow_check/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -632,7 +632,7 @@ impl<'cx, 'tcx> DataflowResultsConsumer<'cx, 'tcx> for MirBorrowckCtxt<'cx, 'tcx
// "Lift" into the tcx -- once regions are erased, this type should be in the
// global arenas; this "lift" operation basically just asserts that is true, but
// that is useful later.
tcx.lift_to_global(&drop_place_ty).unwrap();
tcx.lift(&drop_place_ty).unwrap();

debug!("visit_terminator_drop \
loc: {:?} term: {:?} drop_place: {:?} drop_place_ty: {:?} span: {:?}",
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_traits/chalk_context/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ impl context::UnificationOps<ChalkArenas<'tcx>, ChalkArenas<'tcx>>
&self,
value: DelayedLiteral<ChalkArenas<'tcx>>,
) -> DelayedLiteral<ChalkArenas<'tcx>> {
match self.infcx.tcx.lift_to_global(&value) {
match self.infcx.tcx.lift(&value) {
Some(literal) => literal,
None => bug!("cannot lift {:?}", value),
}
Expand Down
0