Skip to content

Delete stuff that should have been deleted in 1.12.1 #37451

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 60 commits into from

Conversation

infinity0
Copy link
Contributor

Otherwise 1.12.1 FTBFS on Debian when trying to bootstrap from 1.12.0.

This is only really useful if you guys release a 1.12.2, but you might want to think about how to prevent similar things in the future...

brson and others added 30 commits August 16, 2016 10:57
Stabilized

* `Cell::as_ptr`
* `RefCell::as_ptr`
* `IpAddr::is_{unspecified,loopback,multicast}`
* `Ipv6Addr::octets`
* `LinkedList::contains`
* `VecDeque::contains`
* `ExitStatusExt::from_raw` - both on Unix and Windows
* `Receiver::recv_timeout`
* `RecvTimeoutError`
* `BinaryHeap::peek_mut`
* `PeekMut`
* `iter::Product`
* `iter::Sum`
* `OccupiedEntry::remove_entry`
* `VacantEntry::into_key`

Deprecated

* `Cell::as_unsafe_cell`
* `RefCell::as_unsafe_cell`
* `OccupiedEntry::remove_pair`

Closes rust-lang#27708
cc rust-lang#27709
Closes rust-lang#32313
Closes rust-lang#32630
Closes rust-lang#32713
Closes rust-lang#34029
Closes rust-lang#34392
Closes rust-lang#34285
Closes rust-lang#34529
This fixes rust-lang#35849, a regression introduced by the typeck refactoring
around TyNever/!.
The memrchr fallback did not compute the offset correctly. It was
intentioned to land on usize-aligned addresses but did not.
This was suspected to resulted in a crash on ARMv7 platform!

This bug affected non-linux platforms.

I think like this, if we have a slice with pointer `ptr` and length
`len`, we want to find the last usize-aligned offset in the slice.
The correct computation should be:

For example if ptr = 1 and len = 6, and size_of::<usize>() is 4:

[ x x x x x x ]
  1 2 3 4 5 6
        ^-- last aligned address at offset 3 from the start.

The last aligned address is ptr + len - (ptr + len) % usize_size.

Compute offset from the start as:

offset = len - (ptr + len) % usize_size = 6 - (1 + 6) % 4 = 6 - 3 = 3.

I believe the function's return value was always correct previously, if
the platform supported unaligned addresses.
This makes the critical calculation easier to understand.
We were treating an associated type as unsized even when the concrete
instantiation was actually sized. Fix is to normalize before checking
if it is sized.
Go back on half the specialization, the part that changed the Zip
struct's fields themselves depending on the types of the iterators.

This means that the Zip iterator will always carry two usize fields,
which are unused. If a whole for loop using a .zip() iterator is
inlined, these are simply removed and have no effect.

The same improvement for Zip of for example slice iterators remain, and
they still optimize well. However, like when the specialization of zip
was merged, the compiler is still very sensistive to the exact context.

For example this code only autovectorizes if the function is used, not
if the code in zip_sum_i32 is inserted inline it was called:

```
fn zip_sum_i32(xs: &[i32], ys: &[i32]) -> i32 {
    let mut s = 0;
    for (&x, &y) in xs.iter().zip(ys) {
        s += x * y;
    }
    s
}

fn zipdot_i32_default_zip(b: &mut test::Bencher)
{
    let xs = vec![1; 1024];
    let ys = vec![1; 1024];

    b.iter(|| {
        zip_sum_i32(&xs, &ys)
    })
}
```

Include a test that checks that Zip<T, U> is covariant w.r.t. T and U.
eddyb and others added 19 commits September 21, 2016 20:56
[beta] Fix optimization regressions for operations on [x; n]-initialized arr…
Remove reverted feature from relnotes
The collector was asserting a total absence of projections, but some
projections are expected, even in trans: in particular, projections
containing higher-ranked regions, which we don't currently normalize.
that made no sense (see test), and was incompatible with borrowck.

Fixes rust-lang#36936.
Otherwise 1.12.1 FTBFS on Debian when trying to bootstrap from 1.12.0.
@rust-highfive
Copy link
Contributor

r? @alexcrichton

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive
Copy link
Contributor

warning Warning warning

  • Pull requests are usually filed against the master branch for this repo, but this one is against stable. Please double check that you specified the right target!

@bluss
Copy link
Member

bluss commented Oct 28, 2016

Instructions for how to bootstrap from 1.12.0 are here https://users.rust-lang.org/t/bootstrapping-1-12-1-from-1-12-0/7715

@alexcrichton
Copy link
Member

r? @brson

@bors
Copy link
Collaborator

bors commented Nov 8, 2016

☔ The latest upstream changes (presumably #37641) made this pull request unmergeable. Please resolve the merge conflicts.

@infinity0
Copy link
Contributor Author

Obsolete, we're applying the above bootstrapping-1-12-1-from-1-12-0 patch dynamically now in Debian.

@infinity0 infinity0 closed this Nov 8, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.