Skip to content

Commit b207b8e

Browse files
committed
Update vtable_methods
1 parent 2d4d423 commit b207b8e

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

src/librustc/traits/mod.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ use ty::fold::{TypeFolder, TypeFoldable, TypeVisitor};
3131
use infer::{InferCtxt};
3232
use util::common::ErrorReported;
3333

34-
use rustc_data_structures::sync::Lrc;
3534
use std::fmt::Debug;
3635
use std::rc::Rc;
3736
use syntax::ast;
@@ -959,11 +958,11 @@ fn substitute_normalize_and_test_predicates<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx
959958
fn vtable_methods<'a, 'tcx>(
960959
tcx: TyCtxt<'a, 'tcx, 'tcx>,
961960
trait_ref: ty::PolyTraitRef<'tcx>)
962-
-> Lrc<Vec<Option<(DefId, &'tcx Substs<'tcx>)>>>
961+
-> &'tcx [Option<(DefId, &'tcx Substs<'tcx>)>]
963962
{
964963
debug!("vtable_methods({:?})", trait_ref);
965964

966-
Lrc::new(
965+
tcx.promote_vec(
967966
supertraits(tcx, trait_ref).flat_map(move |trait_ref| {
968967
let trait_methods = tcx.associated_items(trait_ref.def_id())
969968
.filter(|item| item.kind == ty::AssociatedKind::Method);

src/librustc/ty/query/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ define_queries! { <'tcx>
368368

369369
Other {
370370
[] fn vtable_methods: vtable_methods_node(ty::PolyTraitRef<'tcx>)
371-
-> Lrc<Vec<Option<(DefId, &'tcx Substs<'tcx>)>>>,
371+
-> &'tcx [Option<(DefId, &'tcx Substs<'tcx>)>],
372372
},
373373

374374
Codegen {

src/librustc_data_structures/defer_deallocs.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,8 @@ impl_defer_dellocs_for_no_drop_type!([] usize);
7979
impl_defer_dellocs_for_no_drop_type!([] u32);
8080
impl_defer_dellocs_for_no_drop_type!([] u64);
8181
impl_defer_dellocs_for_no_drop_type!([<T>] BuildHasherDefault<T>);
82+
impl_defer_dellocs_for_no_drop_type!([<'a, T: ?Sized>] &'a mut T);
83+
impl_defer_dellocs_for_no_drop_type!([<'a, T: ?Sized>] &'a T);
8284

8385
unsafe impl<T: DeferDeallocs> DeferDeallocs for Option<T> {
8486
#[inline]

0 commit comments

Comments
 (0)