- 06 9月, 2017 12 次提交
-
-
由 Stuart Pernsteiner 提交于
-
由 Stuart Pernsteiner 提交于
-
由 bors 提交于
Add hints when intercrate ambiguity causes overlap. I'm going to tackle #23980. # Examples ## Trait impl overlap caused by possible downstream impl ```rust trait Foo<X> {} trait Bar<X> {} impl<X, T> Foo<X> for T where T: Bar<X> {} impl<X> Foo<X> for i32 {} fn main() {} ``` ``` error[E0119]: conflicting implementations of trait `Foo<_>` for type `i32`: --> test1.rs:4:1 | 3 | impl<X, T> Foo<X> for T where T: Bar<X> {} | ------------------------------------------ first implementation here 4 | impl<X> Foo<X> for i32 {} | ^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `i32` | = note: downstream crates may implement Bar error: aborting due to previous error ``` ## Trait impl overlap caused by possible upstream update ```rust trait Foo {} impl<T> Foo for T where T: ::std::fmt::Octal {} impl Foo for () {} fn main() {} ``` ``` error[E0119]: conflicting implementations of trait `Foo` for type `()`: --> test2.rs:3:1 | 2 | impl<T> Foo for T where T: ::std::fmt::Octal {} | ----------------------------------------------- first implementation here 3 | impl Foo for () {} | ^^^^^^^^^^^^^^^^^^ conflicting implementation for `()` | = note: upstream crates may add new impl for std::fmt::Octal in future versions error: aborting due to previous error ``` ## Inherent impl overlap caused by possible downstream impl ```rust trait Bar<X> {} struct A<T, X>(T, X); impl<X, T> A<T, X> where T: Bar<X> { fn f(&self) {} } impl<X> A<i32, X> { fn f(&self) {} } fn main() {} ``` ``` error[E0592]: duplicate definitions with name `f` --> test3.rs:4:38 | 4 | impl<X, T> A<T, X> where T: Bar<X> { fn f(&self) {} } | ^^^^^^^^^^^^^^ duplicate definitions for `f` 5 | impl<X> A<i32, X> { fn f(&self) {} } | -------------- other definition for `f` | = note: downstream crates may implement Bar error: aborting due to previous error ``` ## Inherent impl overlap caused by possible upstream update ```rust struct A<T>(T); impl<T> A<T> where T: ::std::fmt::Octal { fn f(&self) {} } impl A<()> { fn f(&self) {} } fn main() {} ``` ``` error[E0592]: duplicate definitions with name `f` --> test4.rs:3:43 | 3 | impl<T> A<T> where T: ::std::fmt::Octal { fn f(&self) {} } | ^^^^^^^^^^^^^^ duplicate definitions for `f` 4 | impl A<()> { fn f(&self) {} } | -------------- other definition for `f` | = note: upstream crates may add new impl for std::fmt::Octal in future versions error: aborting due to previous error ```
-
由 Niko Matsakis 提交于
-
由 Masaki Hara 提交于
-
由 Masaki Hara 提交于
-
由 Masaki Hara 提交于
-
由 Masaki Hara 提交于
-
由 Masaki Hara 提交于
-
由 Masaki Hara 提交于
-
由 Masaki Hara 提交于
-
由 Masaki Hara 提交于
-
- 05 9月, 2017 3 次提交
-
-
由 bors 提交于
[MIR] Restrict ProjectionElem::Index and Storage{Live,Dead} to Local. (see #44285) r? @nikomatsakis
-
由 bors 提交于
Produce expansion info for more builtin macros r? @jseyfried fixes #43268
-
由 bors 提交于
Compact display of static lib dependencies Fixes #33173 Instead of displaying one dependency per line, I've changed the format to display them all in one line. As a bonus they're in format of linker flags (`-lfoo`), so the output can be copy&pasted if one is actually going to link as suggested.
-
- 04 9月, 2017 12 次提交
-
-
由 bors 提交于
expand on using rustup custom toolchains in CONTRIBUTING.md fixes #42484 Should i include more notes about how to use a local build *without* rustup? It can kinda feel like a cop-out otherwise. Other means that come to mind are setting `$RUSTC` directly and fully installing it. cc @rust-lang/docs
-
由 Oliver Schneider 提交于
-
由 bors 提交于
Resync clippy to v0.0.156 None
-
由 Eduard-Mihai Burtescu 提交于
-
由 bors 提交于
rustbuild: Remove invalid doctest from bootstrap.py
-
由 bors 提交于
add test for not optimized `pow` with constant power Closes #34947
-
由 Manish Goregaokar 提交于
-
由 bors 提交于
stabilize mem::discriminant (closes #24263)
-
由 bors 提交于
rustc: Flag {i,u}128 as unsafe for FFI These don't appear to have a stable ABI as noted in #41799 and the work in compiler-builtins definitely seems to be confirming it!
-
由 Eduard-Mihai Burtescu 提交于
-
由 bors 提交于
More general `on_unimplemented`, with uses in `Try` Allow `on_unimplemented` directives to specify both the label and the primary message of the trait error, and allow them to be controlled by flags - currently only to be desugaring-sensitive. e.g. ```Rust #[rustc_on_unimplemented( on(all(direct, from_desugaring="?"), message="the `?` operator can only be used in a \ function that returns `Result` \ (or another type that implements `{Try}`)", label="cannot use the `?` operator in a function that returns `{Self}`"), )] ``` r? @nikomatsakis
-
由 Eduard-Mihai Burtescu 提交于
-
- 03 9月, 2017 13 次提交
-
-
由 bors 提交于
rustc: rename CodeExtent to Scope and RegionMaps to ScopeTree. r? @nikomatsakis
-
由 Ariel Ben-Yehuda 提交于
-
由 Ariel Ben-Yehuda 提交于
-
由 Ariel Ben-Yehuda 提交于
-
由 Ariel Ben-Yehuda 提交于
Maybe I should allow error messages to check the *specific* desugaring? Thanks @huntiep for the idea!
-
由 Ariel Ben-Yehuda 提交于
-
由 Ariel Ben-Yehuda 提交于
-
由 Ariel Ben-Yehuda 提交于
-
由 bors 提交于
Better StorageLive / StorageDead placement for constants. Fixes problems in miri (see https://github.com/solson/miri/pull/324#issuecomment-326555552) caused by the new scope rules in #43932. What I've tried to do here is always have a `StorageLive` but no `StorageDead` for `'static` slots. It might not work perfectly in all cases, but it should unblock miri. r? @nikomatsakis cc @oli-obk
-
由 bors 提交于
rustc: Remove the `used_unsafe` field on TyCtxt Now that lint levels are available for the entire compilation, this can be an entirely local lint in `effect.rs` cc #44137
-
由 bors 提交于
Update rls And expose the `CFG_VERSION` env var to tools so they can determine the version of Rust. This gets the RLS back on master and so completes the PR dance for the generators PR. r? @alexcrichton
-
由 bors 提交于
Implement RFC 1925 cc #44101
-
由 bors 提交于
powerpc64: improve extern struct ABI These fixes all have to do with the 64-bit PowerPC ELF ABI for big-endian targets. The ELF v2 ABI for powerpc64le already worked well. - Return after marking return aggregates indirect. Fixes #42757. - Pass one-member float aggregates as direct argument values. - Aggregate arguments less than 64-bit must be written in the least- significant bits of the parameter space. - Larger aggregates are instead padded at the tail. (i.e. filling MSBs, padding the remaining LSBs.) New tests were also added for the single-float aggregate, and a 3-byte aggregate to check that it's filled into LSBs. Overall, at least these formerly-failing tests now pass on powerpc64: - run-make/extern-fn-struct-passing-abi - run-make/extern-fn-with-packed-struct - run-pass/extern-pass-TwoU16s.rs - run-pass/extern-pass-TwoU8s.rs - run-pass/struct-return.rs
-