I've been thinking a lot about the upcoming impl period -- as well as just about the compiler team in general. There are a broad range of RFCs that we would like to implement, covering a number of different areas. I would like to propose the formation of various focus groups (maybe these need a new name). The idea is to have independent groups of people focused on a particualr set of RFCs, organized around a common theme. Each group is responsible for planning out the implementation of its RFCs and mentoring people through that work. (After the impl period is over, I envision these groups continuing on, perhaps tweaked in various ways, as the new
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/librustc/infer/error_reporting/different_lifetimes.rs b/src/librustc/infer/error_reporting/different_lifetimes.rs | |
index 90c207ca2e..46b2ec1b3a 100644 | |
--- a/src/librustc/infer/error_reporting/different_lifetimes.rs | |
+++ b/src/librustc/infer/error_reporting/different_lifetimes.rs | |
@@ -139,32 +139,29 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> { | |
if let Some(anon_reg) = self.is_suitable_region(region) { | |
let def_id = anon_reg.def_id; | |
if let Some(node_id) = self.tcx.hir.as_local_node_id(def_id) { | |
- let ret_ty = self.tcx.type_of(def_id); | |
- if let ty::TyFnDef(_, _) = ret_ty.sty { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lunch-box. RUST_BACKTRACE=1 rustc issue-27942.rs | |
error: internal compiler error: src/librustc_typeck/collect.rs:1123: compute_type_of_item: unexpected item type: ItemTrait(Normal, Generics { lifetimes: [LifetimeDef { lifetime: lifetime(11: 'a), bounds: [], pure_wrt_drop: false }], ty_params: [TyParam { name: R(87), id: NodeId(8), bounds: [TraitTyParamBound(PolyTraitRef { bound_lifetimes: [], trait_ref: TraitRef { path: path(Resources<'a>), ref_id: NodeId(9) }, span: issue-27942.rs:13:25: 13:38 }, None)], default: None, span: issue-27942.rs:13:22: 13:23, pure_wrt_drop: false }], where_clause: WhereClause { id: NodeId(12), predicates: [] }, span: issue-27942.rs:13:17: 13:39 }, [], [TraitItemRef { id: TraitItemId { node_id: NodeId(13) }, name: select(88), kind: Method { has_self: true }, span: issue-27942.rs:17:5: 17:45, defaultness: Default { has_value: false } }]) | |
--> issue-27942.rs:13:1 | |
| | |
13 | / pub trait Buffer<'a, R: Resources<'a>> { | |
14 | | //~^ NOTE the lifetime 'a as defined on the trait at 13:1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -121,31 +124,37 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> { | |
// This method returns the DefId and the BoundRegion corresponding to the given region. | |
pub fn is_suitable_region(&self, region: Region<'tcx>) -> Option<FreeRegionInfo> { | |
- if let ty::ReFree(ref free_region) = *region { | |
- let suitable_region_binding_scope = free_region.scope; | |
- let node_id = self.tcx | |
- .hir | |
- .as_local_node_id(suitable_region_binding_scope) | |
- .unwrap(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/librustc/infer/mod.rs b/src/librustc/infer/mod.rs | |
index 21af92a25e..1c9f9b487e 100644 | |
--- a/src/librustc/infer/mod.rs | |
+++ b/src/librustc/infer/mod.rs | |
@@ -1160,6 +1160,19 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> { | |
value.fold_with(&mut r) | |
} | |
+ /// Returns a set of unresolved type variables found by visiting | |
+ /// `T`. In the process of visiting `T`, this will resolve (where |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/librustc/traits/project.rs b/src/librustc/traits/project.rs | |
index 512cfee12b..dcb9507fc0 100644 | |
--- a/src/librustc/traits/project.rs | |
+++ b/src/librustc/traits/project.rs | |
@@ -416,7 +416,8 @@ fn opt_normalize_projection_type<'a, 'b, 'gcx, 'tcx>( | |
// bounds. It might be the case that we want two distinct caches, | |
// or else another kind of cache entry. | |
- match infcx.projection_cache.borrow_mut().try_start(cache_key) { | |
+ let cache_result = infcx.projection_cache.borrow_mut().try_start(cache_key); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DEBUG:rustc::infer::region_inference: RegionVarBindings: resolve_regions() | |
DEBUG:rustc::infer::region_inference: ----() Start constraint listing (subject=4) ()---- | |
DEBUG:rustc::infer::region_inference: ----() End constraint listing (subject=4) ()--- | |
DEBUG:rustc::infer::region_inference: ---- # Iteration Expansion1 | |
DEBUG:rustc::infer::region_inference: ---- Expansion Complete after 1 iteration(s) | |
DEBUG:rustc::infer::region_inference: collect_var_errors | |
DEBUG:rustc::infer::region_inference: RegionVarBindings: resolve_regions() | |
DEBUG:rustc::infer::region_inference: ----() Start constraint listing (subject=4) ()---- | |
DEBUG:rustc::infer::region_inference: ----() End constraint listing (subject=4) ()--- | |
DEBUG:rustc::infer::region_inference: ---- # Iteration Expansion1 |