Skip to content

Commit 40a2e42

Browse files
committed
---
yaml --- r: 278152 b: refs/heads/auto c: b6fc4ab h: refs/heads/master
1 parent 50683d1 commit 40a2e42

File tree

190 files changed

+1903
-4845
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

190 files changed

+1903
-4845
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
88
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
99
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1010
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
11-
refs/heads/auto: cae42a471c13eec8a6470d0845f46f1606d50742
11+
refs/heads/auto: b6fc4abe44da7563851c8e137e16a72f2d7d6832
1212
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1313
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336
1414
refs/tags/0.2: 1754d02027f2924bed83b0160ee340c7f41d5ea1

branches/auto/configure

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -632,6 +632,7 @@ valopt build "${DEFAULT_BUILD}" "GNUs ./configure syntax LLVM build triple"
632632
valopt android-cross-path "" "Android NDK standalone path (deprecated)"
633633
valopt i686-linux-android-ndk "" "i686-linux-android NDK standalone path"
634634
valopt arm-linux-androideabi-ndk "" "arm-linux-androideabi NDK standalone path"
635+
valopt armv7-linux-androideabi-ndk "" "armv7-linux-androideabi NDK standalone path"
635636
valopt aarch64-linux-android-ndk "" "aarch64-linux-android NDK standalone path"
636637
valopt nacl-cross-path "" "NaCl SDK path (Pepper Canary is recommended). Must be absolute!"
637638
valopt release-channel "dev" "the name of the release channel to build"
@@ -1144,6 +1145,15 @@ do
11441145

11451146
case $i in
11461147
*android*)
1148+
case $i in
1149+
armv7-linux-androideabi)
1150+
cmd_prefix="arm-linux-androideabi"
1151+
;;
1152+
*)
1153+
cmd_prefix=$i
1154+
;;
1155+
esac
1156+
11471157
upper_snake_target=$(echo "$i" | tr '[:lower:]' '[:upper:]' | tr '\-' '\_')
11481158
eval ndk=\$"CFG_${upper_snake_target}_NDK"
11491159
if [ -z "$ndk" ]
@@ -1154,7 +1164,7 @@ do
11541164
fi
11551165

11561166
# Perform a basic sanity check of the NDK
1157-
for android_ndk_tool in "$ndk/bin/$i-gcc" "$ndk/bin/$i-g++" "$ndk/bin/$i-ar"
1167+
for android_ndk_tool in "$ndk/bin/$cmd_prefix-gcc" "$ndk/bin/$cmd_prefix-g++" "$ndk/bin/$cmd_prefix-ar"
11581168
do
11591169
if [ ! -f $android_ndk_tool ]
11601170
then
@@ -1786,6 +1796,7 @@ putvar CFG_LIBDIR_RELATIVE
17861796
putvar CFG_DISABLE_MANAGE_SUBMODULES
17871797
putvar CFG_AARCH64_LINUX_ANDROID_NDK
17881798
putvar CFG_ARM_LINUX_ANDROIDEABI_NDK
1799+
putvar CFG_ARMV7_LINUX_ANDROIDEABI_NDK
17891800
putvar CFG_I686_LINUX_ANDROID_NDK
17901801
putvar CFG_NACL_CROSS_PATH
17911802
putvar CFG_MANDIR
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# armv7-linux-androideabi configuration
2+
CC_armv7-linux-androideabi=$(CFG_ARMV7_LINUX_ANDROIDEABI_NDK)/bin/arm-linux-androideabi-gcc
3+
CXX_armv7-linux-androideabi=$(CFG_ARMV7_LINUX_ANDROIDEABI_NDK)/bin/arm-linux-androideabi-g++
4+
CPP_armv7-linux-androideabi=$(CFG_ARMV7_LINUX_ANDROIDEABI_NDK)/bin/arm-linux-androideabi-gcc -E
5+
AR_armv7-linux-androideabi=$(CFG_ARMV7_LINUX_ANDROIDEABI_NDK)/bin/arm-linux-androideabi-ar
6+
CFG_LIB_NAME_armv7-linux-androideabi=lib$(1).so
7+
CFG_STATIC_LIB_NAME_armv7-linux-androideabi=lib$(1).a
8+
CFG_LIB_GLOB_armv7-linux-androideabi=lib$(1)-*.so
9+
CFG_LIB_DSYM_GLOB_armv7-linux-androideabi=lib$(1)-*.dylib.dSYM
10+
CFG_JEMALLOC_CFLAGS_armv7-linux-androideabi := -D__arm__ -DANDROID -D__ANDROID__ $(CFLAGS)
11+
CFG_GCCISH_CFLAGS_armv7-linux-androideabi := -Wall -g -fPIC -D__arm__ -mfloat-abi=softfp -march=armv7-a -mfpu=vfpv3-d16 -DANDROID -D__ANDROID__ $(CFLAGS)
12+
CFG_GCCISH_CXXFLAGS_armv7-linux-androideabi := -fno-rtti $(CXXFLAGS)
13+
CFG_GCCISH_LINK_FLAGS_armv7-linux-androideabi := -shared -fPIC -ldl -g -lm -lsupc++
14+
CFG_GCCISH_DEF_FLAG_armv7-linux-androideabi := -Wl,--export-dynamic,--dynamic-list=
15+
CFG_LLC_FLAGS_armv7-linux-androideabi :=
16+
CFG_INSTALL_NAME_armv7-linux-androideabi =
17+
CFG_EXE_SUFFIX_armv7-linux-androideabi :=
18+
CFG_WINDOWSY_armv7-linux-androideabi :=
19+
CFG_UNIXY_armv7-linux-androideabi := 1
20+
CFG_LDPATH_armv7-linux-androideabi :=
21+
CFG_RUN_armv7-linux-androideabi=
22+
CFG_RUN_TARG_armv7-linux-androideabi=
23+
RUSTC_FLAGS_armv7-linux-androideabi :=
24+
RUSTC_CROSS_FLAGS_armv7-linux-androideabi :=
25+
CFG_GNU_TRIPLE_armv7-linux-androideabi := arm-linux-androideabi

branches/auto/mk/crates.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ DEPS_rustc_lint := rustc log syntax rustc_const_eval
111111
DEPS_rustc_llvm := native:rustllvm libc std rustc_bitflags
112112
DEPS_rustc_metadata := rustc syntax rbml rustc_const_math
113113
DEPS_rustc_passes := syntax rustc core rustc_const_eval
114-
DEPS_rustc_mir := rustc syntax rustc_const_math rustc_const_eval rustc_bitflags
114+
DEPS_rustc_mir := rustc syntax rustc_const_math rustc_const_eval
115115
DEPS_rustc_resolve := arena rustc log syntax
116116
DEPS_rustc_platform_intrinsics := std
117117
DEPS_rustc_plugin := rustc rustc_metadata syntax rustc_mir

branches/auto/mk/ctags.mk

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,14 @@
1515

1616
.PHONY: TAGS.emacs TAGS.vi
1717

18-
CTAGS_RUSTC_LOCATIONS=$(patsubst ${CFG_SRC_DIR}src/lib%test,, \
19-
$(wildcard ${CFG_SRC_DIR}src/lib*)) ${CFG_SRC_DIR}src/libtest
18+
CTAGS_LOCATIONS=$(wildcard ${CFG_SRC_DIR}src/lib*)
2019
CTAGS_LOCATIONS=$(patsubst ${CFG_SRC_DIR}src/librust%,, \
2120
$(patsubst ${CFG_SRC_DIR}src/lib%test,, \
2221
$(wildcard ${CFG_SRC_DIR}src/lib*))) ${CFG_SRC_DIR}src/libtest
23-
CTAGS_OPTS=--options="${CFG_SRC_DIR}src/etc/ctags.rust" --languages=Rust --recurse
24-
25-
TAGS.rustc.emacs:
26-
ctags -e -f $@ ${CTAGS_OPTS} ${CTAGS_RUSTC_LOCATIONS}
22+
CTAGS_OPTS=--options="${CFG_SRC_DIR}src/etc/ctags.rust" --languages=Rust --recurse ${CTAGS_LOCATIONS}
2723

2824
TAGS.emacs:
29-
ctags -e -f $@ ${CTAGS_OPTS} ${CTAGS_LOCATIONS}
30-
31-
TAGS.rustc.vi:
32-
ctags -f $@ ${CTAGS_OPTS} ${CTAGS_RUSTC_LOCATIONS}
25+
ctags -e -f $@ ${CTAGS_OPTS}
3326

3427
TAGS.vi:
35-
ctags -f $@ ${CTAGS_OPTS} ${CTAGS_LOCATIONS}
28+
ctags -f $@ ${CTAGS_OPTS}

branches/auto/mk/dist.mk

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ $(PKG_TAR): $(PKG_FILES)
7777
$(Q)mkdir -p tmp/dist/$(PKG_NAME)
7878
$(Q)tar \
7979
-C $(S) \
80-
-f - \
8180
--exclude-vcs \
8281
--exclude=*~ \
8382
--exclude=*.pyc \
@@ -87,7 +86,7 @@ $(PKG_TAR): $(PKG_FILES)
8786
--exclude=*/llvm/test/*/*/*.ll \
8887
--exclude=*/llvm/test/*/*/*.td \
8988
--exclude=*/llvm/test/*/*/*.s \
90-
-c $(UNROOTED_PKG_FILES) | tar -x -f - -C tmp/dist/$(PKG_NAME)
89+
-c $(UNROOTED_PKG_FILES) | tar -x -C tmp/dist/$(PKG_NAME)
9190
@$(call E, making $@)
9291
$(Q)tar -czf $(PKG_TAR) -C tmp/dist $(PKG_NAME)
9392
$(Q)rm -Rf tmp/dist/$(PKG_NAME)

branches/auto/mk/platform.mk

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ ifdef CFG_CCACHE_BASEDIR
169169
export CCACHE_BASEDIR
170170
endif
171171

172-
FIND_COMPILER = $(strip $(1:ccache=))
172+
FIND_COMPILER = $(word 1,$(1:ccache=))
173173

174174
define CFG_MAKE_TOOLCHAIN
175175
# Prepend the tools with their prefix if cross compiling
@@ -187,7 +187,7 @@ define CFG_MAKE_TOOLCHAIN
187187
endif
188188
endif
189189

190-
CFG_COMPILE_C_$(1) = '$$(call FIND_COMPILER,$$(CC_$(1)))' \
190+
CFG_COMPILE_C_$(1) = '$$(CC_$(1))' \
191191
$$(CFLAGS) \
192192
$$(CFG_GCCISH_CFLAGS) \
193193
$$(CFG_GCCISH_CFLAGS_$(1)) \
@@ -198,7 +198,7 @@ define CFG_MAKE_TOOLCHAIN
198198
$$(CFG_GCCISH_LINK_FLAGS_$(1)) \
199199
$$(CFG_GCCISH_DEF_FLAG_$(1))$$(3) $$(2) \
200200
$$(call CFG_INSTALL_NAME_$(1),$$(4))
201-
CFG_COMPILE_CXX_$(1) = '$$(call FIND_COMPILER,$$(CXX_$(1)))' \
201+
CFG_COMPILE_CXX_$(1) = '$$(CXX_$(1))' \
202202
$$(CXXFLAGS) \
203203
$$(CFG_GCCISH_CFLAGS) \
204204
$$(CFG_GCCISH_CXXFLAGS) \

branches/auto/mk/tests.mk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -635,8 +635,8 @@ CTEST_COMMON_ARGS$(1)-T-$(2)-H-$(3) = \
635635
--host-rustcflags "$(RUSTC_FLAGS_$(3)) $$(CTEST_RUSTC_FLAGS) -L $$(RT_OUTPUT_DIR_$(3))" \
636636
--lldb-python-dir=$(CFG_LLDB_PYTHON_DIR) \
637637
--target-rustcflags "$(RUSTC_FLAGS_$(2)) $$(CTEST_RUSTC_FLAGS) -L $$(RT_OUTPUT_DIR_$(2))" \
638-
--cc '$$(call FIND_COMPILER,$$(CC_$(2)))' \
639-
--cxx '$$(call FIND_COMPILER,$$(CXX_$(2)))' \
638+
--cc '$$(CC_$(2))' \
639+
--cxx '$$(CXX_$(2))' \
640640
--cflags "$$(CFG_GCCISH_CFLAGS_$(2))" \
641641
--llvm-components "$$(LLVM_ALL_COMPONENTS_$(2))" \
642642
--llvm-cxxflags "$$(LLVM_CXXFLAGS_$(2))" \

branches/auto/src/bootstrap/build/config.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,12 @@ impl Config {
338338
.or_insert(Target::default());
339339
target.ndk = Some(PathBuf::from(value));
340340
}
341+
"CFG_ARMV7_LINUX_ANDROIDEABI_NDK" if value.len() > 0 => {
342+
let target = "armv7-linux-androideabi".to_string();
343+
let target = self.target_config.entry(target)
344+
.or_insert(Target::default());
345+
target.ndk = Some(PathBuf::from(value));
346+
}
341347
"CFG_I686_LINUX_ANDROID_NDK" if value.len() > 0 => {
342348
let target = "i686-linux-androideabi".to_string();
343349
let target = self.target_config.entry(target)

branches/auto/src/bootstrap/build/job.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ pub unsafe fn setup() {
5454

5555
// Indicate that when all handles to the job object are gone that all
5656
// process in the object should be killed. Note that this includes our
57-
// entire process tree by default because we've added ourselves and our
57+
// entire process tree by default because we've added ourselves and and our
5858
// children will reside in the job by default.
5959
let mut info = mem::zeroed::<JOBOBJECT_EXTENDED_LIMIT_INFORMATION>();
6060
info.BasicLimitInformation.LimitFlags = JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE;

branches/auto/src/doc/book/getting-started.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ unofficial locations.
9898
| Target | std |rustc|cargo| notes |
9999
|-------------------------------|-----|-----|-----|----------------------------|
100100
| `aarch64-linux-android` || | | ARM64 Android |
101+
| `armv7-linux-androideabi` || | | ARM-v7a Android |
101102
| `i686-linux-android` || | | 32-bit x86 Android |
102103
| `i686-pc-windows-msvc` (XP) || | | Windows XP support |
103104
| `i686-unknown-freebsd` |||| 32-bit FreeBSD |

branches/auto/src/doc/reference.md

Lines changed: 18 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -2063,41 +2063,33 @@ arbitrarily complex configurations through nesting.
20632063

20642064
The following configurations must be defined by the implementation:
20652065

2066-
* `target_arch = "..."` - Target CPU architecture, such as `"x86"`,
2067-
`"x86_64"` `"mips"`, `"powerpc"`, `"powerpc64"`, `"arm"`, or
2068-
`"aarch64"`. This value is closely related to the first element of
2069-
the platform target triple, though it is not identical.
2070-
* `target_os = "..."` - Operating system of the target, examples
2071-
include `"windows"`, `"macos"`, `"ios"`, `"linux"`, `"android"`,
2072-
`"freebsd"`, `"dragonfly"`, `"bitrig"` , `"openbsd"` or
2073-
`"netbsd"`. This value is closely related to the second and third
2074-
element of the platform target triple, though it is not identical.
2066+
* `debug_assertions` - Enabled by default when compiling without optimizations.
2067+
This can be used to enable extra debugging code in development but not in
2068+
production. For example, it controls the behavior of the standard library's
2069+
`debug_assert!` macro.
2070+
* `target_arch = "..."` - Target CPU architecture, such as `"x86"`, `"x86_64"`
2071+
`"mips"`, `"powerpc"`, `"powerpc64"`, `"arm"`, or `"aarch64"`.
2072+
* `target_endian = "..."` - Endianness of the target CPU, either `"little"` or
2073+
`"big"`.
2074+
* `target_env = ".."` - An option provided by the compiler by default
2075+
describing the runtime environment of the target platform. Some examples of
2076+
this are `musl` for builds targeting the MUSL libc implementation, `msvc` for
2077+
Windows builds targeting MSVC, and `gnu` frequently the rest of the time. This
2078+
option may also be blank on some platforms.
20752079
* `target_family = "..."` - Operating system family of the target, e. g.
20762080
`"unix"` or `"windows"`. The value of this configuration option is defined
20772081
as a configuration itself, like `unix` or `windows`.
2078-
* `unix` - See `target_family`.
2079-
* `windows` - See `target_family`.
2080-
* `target_env = ".."` - Further disambiguates the target platform with
2081-
information about the ABI/libc. Presently this value is either
2082-
`"gnu"`, `"msvc"`, `"musl"`, or the empty string. For historical
2083-
reasons this value has only been defined as non-empty when needed
2084-
for disambiguation. Thus on many GNU platforms this value will be
2085-
empty. This value is closely related to the fourth element of the
2086-
platform target triple, though it is not identical. For example,
2087-
embedded ABIs such as `gnueabihf` will simply define `target_env` as
2088-
`"gnu"`.
2089-
* `target_endian = "..."` - Endianness of the target CPU, either `"little"` or
2090-
`"big"`.
2082+
* `target_os = "..."` - Operating system of the target, examples include
2083+
`"windows"`, `"macos"`, `"ios"`, `"linux"`, `"android"`, `"freebsd"`, `"dragonfly"`,
2084+
`"bitrig"` , `"openbsd"` or `"netbsd"`.
20912085
* `target_pointer_width = "..."` - Target pointer width in bits. This is set
20922086
to `"32"` for targets with 32-bit pointers, and likewise set to `"64"` for
20932087
64-bit pointers.
20942088
* `target_vendor = "..."` - Vendor of the target, for example `apple`, `pc`, or
20952089
simply `"unknown"`.
20962090
* `test` - Enabled when compiling the test harness (using the `--test` flag).
2097-
* `debug_assertions` - Enabled by default when compiling without optimizations.
2098-
This can be used to enable extra debugging code in development but not in
2099-
production. For example, it controls the behavior of the standard library's
2100-
`debug_assert!` macro.
2091+
* `unix` - See `target_family`.
2092+
* `windows` - See `target_family`.
21012093

21022094
You can also set another attribute based on a `cfg` variable with `cfg_attr`:
21032095

branches/auto/src/libcollections/slice.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -419,8 +419,8 @@ impl<T> [T] {
419419
///
420420
/// ```rust
421421
/// let v = &[1, 2, 3, 4, 5];
422-
/// for chunk in v.chunks(2) {
423-
/// println!("{:?}", chunk);
422+
/// for win in v.chunks(2) {
423+
/// println!("{:?}", win);
424424
/// }
425425
/// ```
426426
#[stable(feature = "rust1", since = "1.0.0")]

branches/auto/src/libcore/clone.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,6 @@ use marker::Sized;
4949
/// A common trait for cloning an object.
5050
///
5151
/// This trait can be used with `#[derive]`.
52-
///
53-
/// Types that are `Copy` should have a trivial implementation of `Clone`. More formally:
54-
/// if `T: Copy`, `x: T`, and `y: &T`, then `let x = y.clone();` is equivalent to `let x = *y;`.
55-
/// Manual implementations should be careful to uphold this invariant; however, unsafe code
56-
/// must not rely on it to ensure memory safety.
5752
#[stable(feature = "rust1", since = "1.0.0")]
5853
pub trait Clone : Sized {
5954
/// Returns a copy of the value.

branches/auto/src/libcore/convert.rs

Lines changed: 10 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,18 @@
2020
//! - Impl the `As*` traits for reference-to-reference conversions
2121
//! - Impl the `Into` trait when you want to consume the value in the conversion
2222
//! - The `From` trait is the most flexible, useful for value _and_ reference conversions
23-
//! - The `TryFrom` and `TryInto` traits behave like `From` and `Into`, but allow for the
24-
//! conversion to fail
2523
//!
26-
//! As a library author, you should prefer implementing `From<T>` or `TryFrom<T>` rather than
27-
//! `Into<U>` or `TryInto<U>`, as `From` and `TryFrom` provide greater flexibility and offer
28-
//! equivalent `Into` or `TryInto` implementations for free, thanks to a blanket implementation
29-
//! in the standard library.
24+
//! As a library author, you should prefer implementing `From<T>` rather than
25+
//! `Into<U>`, as `From` provides greater flexibility and offers an equivalent `Into`
26+
//! implementation for free, thanks to a blanket implementation in the standard library.
27+
//!
28+
//! **Note: these traits must not fail**. If the conversion can fail, you must use a dedicated
29+
//! method which returns an `Option<T>` or a `Result<T, E>`.
3030
//!
3131
//! # Generic impl
3232
//!
3333
//! - `AsRef` and `AsMut` auto-dereference if the inner type is a reference
3434
//! - `From<U> for T` implies `Into<T> for U`
35-
//! - `TryFrom<U> for T` implies `TryInto<T> for U`
3635
//! - `From` and `Into` are reflexive, which means that all types can `into()`
3736
//! themselves and `from()` themselves
3837
//!
@@ -41,7 +40,6 @@
4140
#![stable(feature = "rust1", since = "1.0.0")]
4241

4342
use marker::Sized;
44-
use result::Result;
4543

4644
/// A cheap, reference-to-reference conversion.
4745
///
@@ -100,8 +98,8 @@ pub trait AsMut<T: ?Sized> {
10098

10199
/// A conversion that consumes `self`, which may or may not be expensive.
102100
///
103-
/// **Note: this trait must not fail**. If the conversion can fail, use `TryInto` or a dedicated
104-
/// method which returns an `Option<T>` or a `Result<T, E>`.
101+
/// **Note: this trait must not fail**. If the conversion can fail, use a dedicated method which
102+
/// returns an `Option<T>` or a `Result<T, E>`.
105103
///
106104
/// Library authors should not directly implement this trait, but should prefer implementing
107105
/// the `From` trait, which offers greater flexibility and provides an equivalent `Into`
@@ -135,8 +133,8 @@ pub trait Into<T>: Sized {
135133

136134
/// Construct `Self` via a conversion.
137135
///
138-
/// **Note: this trait must not fail**. If the conversion can fail, use `TryFrom` or a dedicated
139-
/// method which returns an `Option<T>` or a `Result<T, E>`.
136+
/// **Note: this trait must not fail**. If the conversion can fail, use a dedicated method which
137+
/// returns an `Option<T>` or a `Result<T, E>`.
140138
///
141139
/// # Examples
142140
///
@@ -160,30 +158,6 @@ pub trait From<T>: Sized {
160158
fn from(T) -> Self;
161159
}
162160

163-
/// An attempted conversion that consumes `self`, which may or may not be expensive.
164-
///
165-
/// Library authors should not directly implement this trait, but should prefer implementing
166-
/// the `TryFrom` trait, which offers greater flexibility and provides an equivalent `TryInto`
167-
/// implementation for free, thanks to a blanket implementation in the standard library.
168-
#[unstable(feature = "try_from", issue = "33417")]
169-
pub trait TryInto<T>: Sized {
170-
/// The type returned in the event of a conversion error.
171-
type Err;
172-
173-
/// Performs the conversion.
174-
fn try_into(self) -> Result<T, Self::Err>;
175-
}
176-
177-
/// Attempt to construct `Self` via a conversion.
178-
#[unstable(feature = "try_from", issue = "33417")]
179-
pub trait TryFrom<T>: Sized {
180-
/// The type returned in the event of a conversion error.
181-
type Err;
182-
183-
/// Performs the conversion.
184-
fn try_from(T) -> Result<Self, Self::Err>;
185-
}
186-
187161
////////////////////////////////////////////////////////////////////////////////
188162
// GENERIC IMPLS
189163
////////////////////////////////////////////////////////////////////////////////
@@ -242,17 +216,6 @@ impl<T> From<T> for T {
242216
fn from(t: T) -> T { t }
243217
}
244218

245-
246-
// TryFrom implies TryInto
247-
#[unstable(feature = "try_from", issue = "33417")]
248-
impl<T, U> TryInto<U> for T where U: TryFrom<T> {
249-
type Err = U::Err;
250-
251-
fn try_into(self) -> Result<U, U::Err> {
252-
U::try_from(self)
253-
}
254-
}
255-
256219
////////////////////////////////////////////////////////////////////////////////
257220
// CONCRETE IMPLS
258221
////////////////////////////////////////////////////////////////////////////////

0 commit comments

Comments
 (0)