Skip to content

Rollup of 9 pull requests #39895

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

Closed
wants to merge 27 commits into from
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
738b0f3
Clean up "pattern doesn't bind x" messages
estebank Feb 10, 2017
0d46cfe
Have only one presentation for binding consistency errors
estebank Feb 14, 2017
fa3e19f
fix
estebank Feb 14, 2017
0e6248d
Point to same binding in multiple patterns when possible
estebank Feb 14, 2017
2a45c0a
Sort patterns by pattern number
estebank Feb 14, 2017
4e43853
fix
estebank Feb 14, 2017
39de12f
Check inconsistent bindings in all arms
estebank Feb 15, 2017
c8292fc
Correct a typo in procedural macros chapter of the Book.
CBenoit Feb 15, 2017
f313646
test: Verify all sysroot crates are unstable
alexcrichton Feb 15, 2017
4a3c66a
[MIR] Make InlineAsm a Statement
nagisa Feb 15, 2017
1fbbe79
Fix wording in LocalKey documentation
Feb 15, 2017
ab57e7b
std::io::cursor Added test for seeking beyond i64.
amosonn Feb 16, 2017
a2d176e
std::io::cursor: Fixed Seek so test passes.
amosonn Feb 16, 2017
a7f63d1
Remove noop method `Substs::params()`
estebank Feb 16, 2017
36b00cf
Correct a typo in procedural macros chapter of the Book. (fixup [c829…
CBenoit Feb 16, 2017
01cb587
Simplify wording of diagnostic message
estebank Feb 16, 2017
0e45a5e
[rustbuild] add a way to run command after failure
nagisa Feb 16, 2017
047a215
Set rustdoc --test files' path relative to the current directory
GuillaumeGomez Feb 15, 2017
45e953c
Rollup merge of #39713 - estebank:issue-39698, r=jonathandturner
frewsxcv Feb 17, 2017
7bd6e71
Rollup merge of #39847 - CBenoit:patch-1, r=frewsxcv
frewsxcv Feb 17, 2017
bcacdc3
Rollup merge of #39851 - alexcrichton:verify-unstable, r=brson
frewsxcv Feb 17, 2017
5430487
Rollup merge of #39854 - nagisa:mir-asm-stmt, r=nikomatsakis
frewsxcv Feb 17, 2017
f3d4c8c
Rollup merge of #39859 - GuillaumeGomez:rustdoc-test-relative-path, r…
frewsxcv Feb 17, 2017
f03656a
Rollup merge of #39862 - stjepang:fix-wording-localkey, r=GuillaumeGomez
frewsxcv Feb 17, 2017
2774728
Rollup merge of #39874 - amosonn:master, r=alexcrichton
frewsxcv Feb 17, 2017
a820dc3
Rollup merge of #39877 - estebank:remove-params, r=petrochenkov
frewsxcv Feb 17, 2017
79d4c84
Rollup merge of #39888 - nagisa:on-fail-bootstrap, r=alexcrichton
frewsxcv Feb 17, 2017
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
4 changes: 2 additions & 2 deletions src/librustc/traits/select.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2547,7 +2547,7 @@ impl<'cx, 'gcx, 'tcx> SelectionContext<'cx, 'gcx, 'tcx> {
// TyError and ensure they do not affect any other fields.
// This could be checked after type collection for any struct
// with a potentially unsized trailing field.
let params = substs_a.params().iter().enumerate().map(|(i, &k)| {
let params = substs_a.iter().enumerate().map(|(i, &k)| {
if ty_params.contains(i) {
Kind::from(tcx.types.err)
} else {
Expand All @@ -2567,7 +2567,7 @@ impl<'cx, 'gcx, 'tcx> SelectionContext<'cx, 'gcx, 'tcx> {

// Check that the source structure with the target's
// type parameters is a subtype of the target.
let params = substs_a.params().iter().enumerate().map(|(i, &k)| {
let params = substs_a.iter().enumerate().map(|(i, &k)| {
if ty_params.contains(i) {
Kind::from(substs_b.type_at(i))
} else {
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/ty/relate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ pub fn relate_substs<'a, 'gcx, 'tcx, R>(relation: &mut R,
{
let tcx = relation.tcx();

let params = a_subst.params().iter().zip(b_subst.params()).enumerate().map(|(i, (a, b))| {
let params = a_subst.iter().zip(b_subst).enumerate().map(|(i, (a, b))| {
let variance = variances.map_or(ty::Invariant, |v| v[i]);
if let (Some(a_ty), Some(b_ty)) = (a.as_type(), b.as_type()) {
Ok(Kind::from(relation.relate_with_variance(variance, &a_ty, &b_ty)?))
Expand Down
6 changes: 0 additions & 6 deletions src/librustc/ty/subst.rs
Original file line number Diff line number Diff line change
Expand Up @@ -254,12 +254,6 @@ impl<'a, 'gcx, 'tcx> Substs<'tcx> {
self.is_empty()
}

#[inline]
pub fn params(&self) -> &[Kind<'tcx>] {
// FIXME (dikaiosune) this should be removed, and corresponding compilation errors fixed
self
}

#[inline]
pub fn types(&'a self) -> impl DoubleEndedIterator<Item=Ty<'tcx>> + 'a {
self.iter().filter_map(|k| k.as_type())
Expand Down
6 changes: 3 additions & 3 deletions src/librustc_typeck/check/method/confirm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -309,17 +309,17 @@ impl<'a, 'gcx, 'tcx> ConfirmContext<'a, 'gcx, 'tcx> {
// parameters from the type and those from the method.
//
// FIXME -- permit users to manually specify lifetimes
let supplied_start = substs.params().len() + method_generics.regions.len();
let supplied_start = substs.len() + method_generics.regions.len();
Substs::for_item(self.tcx, pick.item.def_id, |def, _| {
let i = def.index as usize;
if i < substs.params().len() {
if i < substs.len() {
substs.region_at(i)
} else {
self.region_var_for_def(self.span, def)
}
}, |def, cur_substs| {
let i = def.index as usize;
if i < substs.params().len() {
if i < substs.len() {
substs.type_at(i)
} else if supplied_method_types.is_empty() {
self.type_var_for_def(self.span, def, cur_substs)
Expand Down
4 changes: 2 additions & 2 deletions src/librustc_typeck/check/method/probe.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1326,7 +1326,7 @@ impl<'a, 'gcx, 'tcx> ProbeContext<'a, 'gcx, 'tcx> {
} else {
let substs = Substs::for_item(self.tcx, method, |def, _| {
let i = def.index as usize;
if i < substs.params().len() {
if i < substs.len() {
substs.region_at(i)
} else {
// In general, during probe we erase regions. See
Expand All @@ -1335,7 +1335,7 @@ impl<'a, 'gcx, 'tcx> ProbeContext<'a, 'gcx, 'tcx> {
}
}, |def, cur_substs| {
let i = def.index as usize;
if i < substs.params().len() {
if i < substs.len() {
substs.type_at(i)
} else {
self.type_var_for_def(self.span, def, cur_substs)
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_typeck/check/writeback.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ impl<'cx, 'gcx, 'tcx> WritebackCx<'cx, 'gcx, 'tcx> {

let gcx = fcx.tcx.global_tcx();
let free_substs = fcx.parameter_environment.free_substs;
for (i, k) in free_substs.params().iter().enumerate() {
for (i, k) in free_substs.iter().enumerate() {
let r = if let Some(r) = k.as_region() {
r
} else {
Expand Down