Skip to content
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

Rollup of 23 pull requests #49264

Merged
merged 79 commits into from
Mar 22, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
79 commits
Select commit Hold shift + click to select a range
312e53d
Update RELEASES.md for 1.25.0
Feb 20, 2018
1f3b626
Update RELEASES.md
Aaronepower Feb 20, 2018
acc1b6d
Update RELEASES.md
Aaronepower Feb 22, 2018
f83618b
Update RELEASES.md
Aaronepower Mar 14, 2018
017bfc3
expose #[target_feature] attributes in rustdoc
QuietMisdreavus Mar 5, 2018
4647156
replace `convert::Infallible` with `!`
canndrew Mar 15, 2018
450d35f
Remove unused fields
wesleywiser Mar 8, 2018
86a123c
Queryify check_item_well_formed
wesleywiser Mar 10, 2018
edbd02f
Queryify check_trait_item_well_formed
wesleywiser Mar 10, 2018
4f1f389
Queryify check_impl_item_well_formed
wesleywiser Mar 10, 2018
b418b7b
Remove CheckTypeWellFormed struct and convert to free functions
wesleywiser Mar 13, 2018
15bab45
Add From<!> for TryFromIntError
canndrew Mar 15, 2018
e09dbbc
Add an example of lossy decoding to str::Utf8Error docs
SimonSapin Mar 17, 2018
7278e37
update FIXME(#6393) to point to issue 43234 (tracking issue for non-l…
nivkner Dec 9, 2017
ba836f4
update FIXME(#15760) to point to issue 27336 (tracking issue for Defa…
nivkner Mar 16, 2018
d1dacdd
update FIXME(#7622) to point to issue 44580 (tracking issue for const…
nivkner Mar 17, 2018
e1b9bf0
update FIXME(#23442) to point to issue 45742 (Blanket impl of AsRef f…
nivkner Mar 17, 2018
3753e1a
update FIXME(#5244) to point to RFC 1109 (Non-Copy array creation erg…
nivkner Mar 16, 2018
4a06708
remove FIXME(#39119) and allow running test on emscripten
nivkner Dec 9, 2017
622c445
remove FIXME(#37712) and implement ItemLikeVisitor instead of Visitor
nivkner Dec 9, 2017
69d12a2
remove FIXME(#30046) and infer moves on pattern matching
nivkner Mar 16, 2018
fd00755
remove FIXME(#11094) and allow make tests to run on targets besides host
nivkner Mar 17, 2018
2c6b7b9
remove FIXME(#2543) and avoid bad copies
nivkner Mar 17, 2018
0d8fa82
remove FIXME(#48116) and remove the logic to debug the issue
nivkner Mar 16, 2018
be73a1f
remove FIXME(#33435) and remove the spurious failures counter measure
nivkner Mar 17, 2018
c8be5c3
remove FIXME(#8372) since for-loops wont support borrowing iterators
nivkner Mar 17, 2018
d5b55c1
remove FIXME(#27889) since the issue is already fixed
nivkner Mar 17, 2018
e269a74
Allow test target to pass without installing
semarie Mar 18, 2018
7786f70
Add warning for invalid start of code blocks in rustdoc
GuillaumeGomez Feb 28, 2018
ca476dd
Revert "Remove useless powerpc64 entry from ARCH_TABLE, closes #47737"
varkor Mar 19, 2018
1578b1e
Update submodules in parallel
Zoxc Mar 16, 2018
e2cf172
Update RELEASES.md
Aaronepower Mar 19, 2018
2b64799
Make Atomic doc examples specific to each type
GuillaumeGomez Mar 14, 2018
bac6484
Fix automatic urls with backticks
GuillaumeGomez Mar 19, 2018
25c8210
Put `#[macro_use] extern crate <crate>` before fn main() in doctests
memoryleak47 Mar 19, 2018
c43b1a0
Convert SerializedDepGraph to be a struct-of-arrays
wesleywiser Mar 15, 2018
eae6d51
Add more canonicalisations for OS_TABLE and ARCH_TABLE
varkor Mar 19, 2018
61e1fbc
Make compiletest do exact matching on triples
varkor Mar 19, 2018
859640a
Run the `run-make` tests last, so more tests run on Windows when `mak…
Zoxc Mar 20, 2018
de9e665
Improve comments for Rule Implemented-From-Impl
varkor Mar 20, 2018
b8c75d9
Implement Rule Implemented-From-Env
varkor Mar 20, 2018
7791995
Add unit test for Implemented-From-Env
varkor Mar 20, 2018
53c6d9b
Don't check interpret_interner when accessing a static to fix miri mu…
bjorn3 Mar 20, 2018
25abe48
Pass attributes to hir::TyParam
mrowqa Mar 20, 2018
6956bbf
whitelist every target feature for rustdoc
QuietMisdreavus Mar 21, 2018
66d120c
Revert "remove FIXME(#33435) and remove the spurious failures counter…
nivkner Mar 21, 2018
e0165af
fix vector fmin/fmax non-fast/fast intrinsics NaN handling
gnzlbg Mar 21, 2018
5aa29c4
Fix test error
bjorn3 Mar 21, 2018
c7bdd37
Revert "Apply a fix to travis-ci/dpl#788 manually until dpl 1.9.5 is …
kennytm Mar 21, 2018
c09b9f9
Deprecate the AsciiExt trait in favor of inherent methods
SimonSapin Mar 17, 2018
4b67324
Fix type_dependent_defs ICE on method calls
varkor Mar 21, 2018
2ba41e9
update stdsimd
QuietMisdreavus Mar 21, 2018
3272b63
Moved test to ui
varkor Mar 21, 2018
99b49b5
Now it compiles
mrowqa Mar 21, 2018
b3fb0d1
add target_feature items to doc_cfg rustdoc test
QuietMisdreavus Mar 22, 2018
d313700
Rollup merge of #48374 - Aaronepower:master, r=Mark-Simulacrum
kennytm Mar 22, 2018
a848336
Rollup merge of #48596 - GuillaumeGomez:invalid-code-block-start, r=Q…
kennytm Mar 22, 2018
d670842
Rollup merge of #48759 - QuietMisdreavus:simd-feature-docs, r=Guillau…
kennytm Mar 22, 2018
b7ee149
Rollup merge of #48939 - wesleywiser:incr_query_wf_checking, r=michae…
kennytm Mar 22, 2018
ca54ff2
Rollup merge of #49029 - GuillaumeGomez:atomic-docs, r=QuietMisdreavus
kennytm Mar 22, 2018
50850c6
Rollup merge of #49069 - wesleywiser:incr_soa, r=michaelwoerister
kennytm Mar 22, 2018
08526c8
Rollup merge of #49093 - Zoxc:speedup, r=aidanhs
kennytm Mar 22, 2018
245f4c4
Rollup merge of #49109 - SimonSapin:deprecate-asciiext, r=alexcrichton
kennytm Mar 22, 2018
8d3f3f0
Rollup merge of #49117 - nivkner:fixme_fixup3, r=estebank
kennytm Mar 22, 2018
20eaf35
Rollup merge of #49140 - semarie:rustdoc-test-path, r=alexcrichton
kennytm Mar 22, 2018
c945725
Rollup merge of #49158 - varkor:compiletest-triples, r=rkruppe
kennytm Mar 22, 2018
95967c7
Rollup merge of #49188 - memoryleak47:macro_use_doctest, r=QuietMisdr…
kennytm Mar 22, 2018
d7eda77
Rollup merge of #49189 - GuillaumeGomez:fix-implied-shortcut-links, r…
kennytm Mar 22, 2018
34eca53
Rollup merge of #49209 - Zoxc:run-make-last, r=Mark-Simulacrum
kennytm Mar 22, 2018
70ae917
Rollup merge of #49211 - varkor:chalk-lowering-Implemented-From-Env, …
kennytm Mar 22, 2018
346a46e
Rollup merge of #49216 - bjorn3:patch-1, r=estebank
kennytm Mar 22, 2018
3e95c71
Rollup merge of #49225 - QuietMisdreavus:all-the-features-all-the-tim…
kennytm Mar 22, 2018
87f5a4b
Rollup merge of #49231 - gnzlbg:fix_vec_fminmax, r=rkruppe
kennytm Mar 22, 2018
a10db97
Rollup merge of #49234 - kennytm:revert-fix-dpl-788, r=alexcrichton
kennytm Mar 22, 2018
eb99deb
Rollup merge of #49242 - Mrowqa:typaram-attrs, r=petrochenkov
kennytm Mar 22, 2018
d54f74e
Rollup merge of #49244 - varkor:type_dependent_defs_ExprMethodCall, r…
kennytm Mar 22, 2018
a4bc859
Revert "Temporarily disable dist-ing RLS, Rustfmt and Clippy."
kennytm Mar 22, 2018
2b9674d
Rollup merge of #49105 - SimonSapin:from_utf8_lossy_example, r=alexcr…
kennytm Mar 22, 2018
2c6f911
Rollup merge of #49038 - canndrew:replace-infallible-with-never, r=Si…
kennytm Mar 22, 2018
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
8 changes: 0 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -318,8 +318,6 @@ before_deploy:

deploy:
- provider: s3
edge:
branch: s3-eager-autoload
bucket: rust-lang-ci2
skip_cleanup: true
local_dir: deploy
Expand All @@ -336,8 +334,6 @@ deploy:
# this is the same as the above deployment provider except that it uploads to
# a slightly different directory and has a different trigger
- provider: s3
edge:
branch: s3-eager-autoload
bucket: rust-lang-ci2
skip_cleanup: true
local_dir: deploy
Expand All @@ -355,8 +351,6 @@ deploy:
# try branch. Travis does not appear to provide a way to use "or" in these
# conditions.
- provider: s3
edge:
branch: s3-eager-autoload
bucket: rust-lang-ci2
skip_cleanup: true
local_dir: deploy
Expand All @@ -371,8 +365,6 @@ deploy:
condition: $DEPLOY = 1

- provider: s3
edge:
branch: s3-eager-autoload
bucket: rust-lang-ci2
skip_cleanup: true
local_dir: deploy
Expand Down
100 changes: 100 additions & 0 deletions RELEASES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,103 @@
Version 1.25.0 (2018-03-29)
==========================

Language
--------
- [Stabilised `#[repr(align(x))]`.][47006] [RFC 1358]
- [You can now use nested groups of imports.][47948]
e.g. `use std::{fs::File, io::Read, path::{Path, PathBuf}};`
- [You can now have `|` at the start of a match arm.][47947] e.g.
```rust
enum Foo { A, B, C }

fn main() {
let x = Foo::A;
match x {
| Foo::A
| Foo::B => println!("AB"),
| Foo::C => println!("C"),
}
}
```

Compiler
--------
- [Upgraded to LLVM 6.][47828]
- [Added `-C lto=val` option.][47521]
- [Added `i586-unknown-linux-musl` target][47282]

Libraries
---------
- [Impl Send for `process::Command` on Unix.][47760]
- [Impl PartialEq and Eq for `ParseCharError`.][47790]
- [`UnsafeCell::into_inner` is now safe.][47204]
- [Implement libstd for CloudABI.][47268]
- [`Float::{from_bits, to_bits}` is now available in libcore.][46931]
- [Implement `AsRef<Path>` for Component][46985]
- [Implemented `Write` for `Cursor<&mut Vec<T>>`][46830]
- [Moved `Duration` to libcore.][46666]

Stabilized APIs
---------------
- [`Location::column`]
- [`ptr::NonNull`]

The following functions can now be used in a constant expression.
eg. `static MINUTE: Duration = Duration::from_secs(60);`
- [`Duration::new`][47300]
- [`Duration::from_secs`][47300]
- [`Duration::from_millis`][47300]
- [`Duration::from_micros`][47300]
- [`Duration::from_nanos`][47300]

Cargo
-----
- [`cargo new` no longer removes `rust` or `rs` prefixs/suffixs.][cargo/5013]
- [`cargo new` now defaults to creating a binary crate, instead of a
library crate.][cargo/5029]

Misc
----
- [Rust by example is now shipped with new releases][46196]

Compatibility Notes
-------------------
- [Deprecated `net::lookup_host`.][47510]
- [`rustdoc` has switched to pulldown as the default markdown renderer.][47398]
- The borrow checker was sometimes incorrectly permitting overlapping borrows
around indexing operations (see [#47349][47349]). This has been fixed (which also
enabled some correct code that used to cause errors (e.g. [#33903][33903] and [#46095][46095]).
- [Removed deprecated unstable attribute `#[simd]`.][47251]

[33903]: /~https://github.com/rust-lang/rust/pull/33903
[47947]: /~https://github.com/rust-lang/rust/pull/47947
[47948]: /~https://github.com/rust-lang/rust/pull/47948
[47760]: /~https://github.com/rust-lang/rust/pull/47760
[47790]: /~https://github.com/rust-lang/rust/pull/47790
[47828]: /~https://github.com/rust-lang/rust/pull/47828
[47398]: /~https://github.com/rust-lang/rust/pull/47398
[47510]: /~https://github.com/rust-lang/rust/pull/47510
[47521]: /~https://github.com/rust-lang/rust/pull/47521
[47204]: /~https://github.com/rust-lang/rust/pull/47204
[47251]: /~https://github.com/rust-lang/rust/pull/47251
[47268]: /~https://github.com/rust-lang/rust/pull/47268
[47282]: /~https://github.com/rust-lang/rust/pull/47282
[47300]: /~https://github.com/rust-lang/rust/pull/47300
[47349]: /~https://github.com/rust-lang/rust/pull/47349
[46931]: /~https://github.com/rust-lang/rust/pull/46931
[46985]: /~https://github.com/rust-lang/rust/pull/46985
[47006]: /~https://github.com/rust-lang/rust/pull/47006
[46830]: /~https://github.com/rust-lang/rust/pull/46830
[46095]: /~https://github.com/rust-lang/rust/pull/46095
[46666]: /~https://github.com/rust-lang/rust/pull/46666
[46196]: /~https://github.com/rust-lang/rust/pull/46196
[cargo/5013]: /~https://github.com/rust-lang/cargo/pull/5013
[cargo/5029]: /~https://github.com/rust-lang/cargo/pull/5029
[RFC 1358]: /~https://github.com/rust-lang/rfcs/pull/1358
[`Location::column`]: https://doc.rust-lang.org/std/panic/struct.Location.html#method.column
[`ptr::NonNull`]: https://doc.rust-lang.org/std/ptr/struct.NonNull.html


Version 1.24.0 (2018-02-15)
==========================

Expand Down
6 changes: 4 additions & 2 deletions src/bootstrap/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -308,12 +308,14 @@ impl<'a> Builder<'a> {
test::UiFullDeps, test::RunPassFullDeps, test::RunFailFullDeps,
test::CompileFailFullDeps, test::IncrementalFullDeps, test::Rustdoc, test::Pretty,
test::RunPassPretty, test::RunFailPretty, test::RunPassValgrindPretty,
test::RunPassFullDepsPretty, test::RunFailFullDepsPretty, test::RunMake,
test::RunPassFullDepsPretty, test::RunFailFullDepsPretty,
test::Crate, test::CrateLibrustc, test::CrateRustdoc, test::Linkcheck,
test::Cargotest, test::Cargo, test::Rls, test::ErrorIndex, test::Distcheck,
test::Nomicon, test::Reference, test::RustdocBook, test::RustByExample,
test::TheBook, test::UnstableBook,
test::Rustfmt, test::Miri, test::Clippy, test::RustdocJS, test::RustdocTheme),
test::Rustfmt, test::Miri, test::Clippy, test::RustdocJS, test::RustdocTheme,
// Run run-make last, since these won't pass without make on Windows
test::RunMake),
Kind::Bench => describe!(test::Crate, test::CrateLibrustc),
Kind::Doc => describe!(doc::UnstableBook, doc::UnstableBookGen, doc::TheBook,
doc::Standalone, doc::Std, doc::Test, doc::Rustc, doc::ErrorIndex, doc::Nomicon,
Expand Down
72 changes: 29 additions & 43 deletions src/ci/init_repo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ ci_dir=$(cd $(dirname $0) && pwd)
. "$ci_dir/shared.sh"

travis_fold start init_repo
travis_time_start

REPO_DIR="$1"
CACHE_DIR="$2"
Expand All @@ -42,54 +43,39 @@ if grep -q RUST_RELEASE_CHANNEL=beta src/ci/run.sh; then
git fetch origin --unshallow beta master
fi

travis_fold start update_cache
travis_time_start

# Update the cache (a pristine copy of the rust source master)
retry sh -c "rm -rf $cache_src_dir && mkdir -p $cache_src_dir && \
git clone --depth 1 /~https://github.com/rust-lang/rust.git $cache_src_dir"
if [ -d $cache_src_dir/src/llvm ]; then
(cd $cache_src_dir && git rm src/llvm)
fi
if [ -d $cache_src_dir/src/llvm-emscripten ]; then
(cd $cache_src_dir && git rm src/llvm-emscripten)
fi
retry sh -c "cd $cache_src_dir && \
git submodule deinit -f . && git submodule sync && git submodule update --init"

travis_fold end update_cache
travis_time_finish
function fetch_submodule {
local module=$1
local cached="download-${module//\//-}.tar.gz"
retry sh -c "rm -f $cached && \
curl -sSL -o $cached $2"
mkdir $module
touch "$module/.git"
tar -C $module --strip-components=1 -xf $cached
rm $cached
}

travis_fold start update_submodules
travis_time_start

# Update the submodules of the repo we're in, using the pristine repo as
# a cache for any object files
# No, `git submodule foreach` won't work:
# http://stackoverflow.com/questions/12641469/list-submodules-in-a-git-repository
included="src/llvm src/llvm-emscripten src/doc/book src/doc/rust-by-example"
modules="$(git config --file .gitmodules --get-regexp '\.path$' | cut -d' ' -f2)"
for module in $modules; do
if [ "$module" = src/llvm ] || [ "$module" = src/llvm-emscripten ]; then
modules=($modules)
use_git=""
urls="$(git config --file .gitmodules --get-regexp '\.url$' | cut -d' ' -f2)"
urls=($urls)
for i in ${!modules[@]}; do
module=${modules[$i]}
if [[ " $included " = *" $module "* ]]; then
commit="$(git ls-tree HEAD $module | awk '{print $3}')"
git rm $module
retry sh -c "rm -f $commit.tar.gz && \
curl -sSL -O /~https://github.com/rust-lang/llvm/archive/$commit.tar.gz"
tar -C src/ -xf "$commit.tar.gz"
rm "$commit.tar.gz"
mv "src/llvm-$commit" $module
continue
fi
if [ ! -e "$cache_src_dir/$module/.git" ]; then
echo "WARNING: $module not found in pristine repo"
retry sh -c "git submodule deinit -f $module && \
git submodule update --init --recursive $module"
url=${urls[$i]}
url=${url/\.git/}
fetch_submodule $module "$url/archive/$commit.tar.gz" &
continue
else
use_git="$use_git $module"
fi
retry sh -c "git submodule deinit -f $module && \
git submodule update --init --recursive --reference $cache_src_dir/$module $module"
done

travis_fold end update_submodules
travis_time_finish

retry sh -c "git submodule deinit -f $use_git && \
git submodule sync && \
git submodule update -j 16 --init --recursive $use_git"
wait
travis_fold end init_repo
travis_time_finish
10 changes: 1 addition & 9 deletions src/ci/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -105,15 +105,7 @@ fi
travis_fold end log-system-info

if [ ! -z "$SCRIPT" ]; then
# FIXME(#49246): Re-enable these tools after #49246 has been merged and thus fixing the cache.
if [ "$DEPLOY_ALT" = 1 ]; then
sh -x -c "$SCRIPT \
--exclude src/tools/rls \
--exclude src/tools/rustfmt \
--exclude src/tools/clippy"
else
sh -x -c "$SCRIPT"
fi
sh -x -c "$SCRIPT"
else
do_make() {
travis_fold start "make-$1"
Expand Down
2 changes: 1 addition & 1 deletion src/liballoc/tests/slice.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1351,7 +1351,7 @@ fn test_copy_from_slice_dst_shorter() {
const MAX_LEN: usize = 80;

static DROP_COUNTS: [AtomicUsize; MAX_LEN] = [
// FIXME #5244: AtomicUsize is not Copy.
// FIXME(RFC 1109): AtomicUsize is not Copy.
AtomicUsize::new(0), AtomicUsize::new(0), AtomicUsize::new(0), AtomicUsize::new(0),
AtomicUsize::new(0), AtomicUsize::new(0), AtomicUsize::new(0), AtomicUsize::new(0),
AtomicUsize::new(0), AtomicUsize::new(0), AtomicUsize::new(0), AtomicUsize::new(0),
Expand Down
25 changes: 3 additions & 22 deletions src/libcore/convert.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,25 +48,6 @@

#![stable(feature = "rust1", since = "1.0.0")]

use fmt;

/// A type used as the error type for implementations of fallible conversion
/// traits in cases where conversions cannot actually fail.
///
/// Because `Infallible` has no variants, a value of this type can never exist.
/// It is used only to satisfy trait signatures that expect an error type, and
/// signals to both the compiler and the user that the error case is impossible.
#[unstable(feature = "try_from", issue = "33417")]
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub enum Infallible {}

#[unstable(feature = "try_from", issue = "33417")]
impl fmt::Display for Infallible {
fn fmt(&self, _: &mut fmt::Formatter) -> fmt::Result {
match *self {
}
}
}
/// A cheap reference-to-reference conversion. Used to convert a value to a
/// reference value within generic code.
///
Expand Down Expand Up @@ -382,7 +363,7 @@ impl<'a, T: ?Sized, U: ?Sized> AsRef<U> for &'a mut T where T: AsRef<U>
}
}

// FIXME (#23442): replace the above impls for &/&mut with the following more general one:
// FIXME (#45742): replace the above impls for &/&mut with the following more general one:
// // As lifts over Deref
// impl<D: ?Sized + Deref, U: ?Sized> AsRef<U> for D where D::Target: AsRef<U> {
// fn as_ref(&self) -> &U {
Expand All @@ -399,7 +380,7 @@ impl<'a, T: ?Sized, U: ?Sized> AsMut<U> for &'a mut T where T: AsMut<U>
}
}

// FIXME (#23442): replace the above impl for &mut with the following more general one:
// FIXME (#45742): replace the above impl for &mut with the following more general one:
// // AsMut lifts over DerefMut
// impl<D: ?Sized + Deref, U: ?Sized> AsMut<U> for D where D::Target: AsMut<U> {
// fn as_mut(&mut self) -> &mut U {
Expand Down Expand Up @@ -438,7 +419,7 @@ impl<T, U> TryInto<U> for T where U: TryFrom<T>
// with an uninhabited error type.
#[unstable(feature = "try_from", issue = "33417")]
impl<T, U> TryFrom<U> for T where T: From<U> {
type Error = Infallible;
type Error = !;

fn try_from(value: U) -> Result<Self, Self::Error> {
Ok(T::from(value))
Expand Down
2 changes: 1 addition & 1 deletion src/libcore/iter/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1872,7 +1872,7 @@ impl<I: Iterator> Iterator for Peekable<I> {

#[inline]
fn nth(&mut self, n: usize) -> Option<I::Item> {
// FIXME(#6393): merge these when borrow-checking gets better.
// FIXME(#43234): merge these when borrow-checking gets better.
if n == 0 {
match self.peeked.take() {
Some(v) => v,
Expand Down
17 changes: 8 additions & 9 deletions src/libcore/num/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

#![stable(feature = "rust1", since = "1.0.0")]

use convert::{Infallible, TryFrom};
use convert::TryFrom;
use fmt;
use intrinsics;
use ops;
Expand Down Expand Up @@ -3596,10 +3596,9 @@ impl fmt::Display for TryFromIntError {
}

#[unstable(feature = "try_from", issue = "33417")]
impl From<Infallible> for TryFromIntError {
fn from(infallible: Infallible) -> TryFromIntError {
match infallible {
}
impl From<!> for TryFromIntError {
fn from(never: !) -> TryFromIntError {
never
}
}

Expand All @@ -3608,7 +3607,7 @@ macro_rules! try_from_unbounded {
($source:ty, $($target:ty),*) => {$(
#[unstable(feature = "try_from", issue = "33417")]
impl TryFrom<$source> for $target {
type Error = Infallible;
type Error = !;

#[inline]
fn try_from(value: $source) -> Result<Self, Self::Error> {
Expand Down Expand Up @@ -3719,7 +3718,7 @@ try_from_lower_bounded!(isize, usize);
#[cfg(target_pointer_width = "16")]
mod ptr_try_from_impls {
use super::TryFromIntError;
use convert::{Infallible, TryFrom};
use convert::TryFrom;

try_from_upper_bounded!(usize, u8);
try_from_unbounded!(usize, u16, u32, u64, u128);
Expand All @@ -3745,7 +3744,7 @@ mod ptr_try_from_impls {
#[cfg(target_pointer_width = "32")]
mod ptr_try_from_impls {
use super::TryFromIntError;
use convert::{Infallible, TryFrom};
use convert::TryFrom;

try_from_upper_bounded!(usize, u8, u16);
try_from_unbounded!(usize, u32, u64, u128);
Expand All @@ -3771,7 +3770,7 @@ mod ptr_try_from_impls {
#[cfg(target_pointer_width = "64")]
mod ptr_try_from_impls {
use super::TryFromIntError;
use convert::{Infallible, TryFrom};
use convert::TryFrom;

try_from_upper_bounded!(usize, u8, u16, u32);
try_from_unbounded!(usize, u64, u128);
Expand Down
Loading