- 05 1月, 2015 4 次提交
-
-
由 Niko Matsakis 提交于
all that stuff twice. Also, code reads so much nicer.
-
由 Flavio Percoco 提交于
This commit introduces the syntax for negative implmenetations of traits as shown below: `impl !Trait for Type {}` cc #13231 Part of RFC #3
-
由 Ben Foppa 提交于
-
由 Niko Matsakis 提交于
-
- 04 1月, 2015 4 次提交
-
-
由 Jorge Aparicio 提交于
-
由 Jorge Aparicio 提交于
-
由 Jorge Aparicio 提交于
-
由 Jorge Aparicio 提交于
-
- 03 1月, 2015 11 次提交
-
-
由 Jorge Aparicio 提交于
-
由 Jorge Aparicio 提交于
-
由 Niko Matsakis 提交于
and which uses EUV. For now, upvar inference is not any smarter than it ever was, but regionck is simpler because it doesn't have to do as many things at once.
-
由 Niko Matsakis 提交于
`UnboxedClosureTyper`. This requires adding a `tcx` field to `ParameterEnvironment` but generally simplifies everything since we only need to pass along an `UnboxedClosureTyper` or `Typer`.
-
由 Niko Matsakis 提交于
which should always result in an error. NB. Some of the hunks in this commit rely on a later commit which adds `tcx` into `param_env` and modifies `ParameterEnvironment` to implement `Typer`.
-
由 Niko Matsakis 提交于
expr-use-visitor) early. Turns out I was wrong to remove this; it causes a lot of pain trying to run EUV etc during typeck without ICEing on erroneous programs.
-
由 Niko Matsakis 提交于
-
由 Niko Matsakis 提交于
-
由 Niko Matsakis 提交于
check it more easily; also extend object safety to cover sized types as well as static methods. This makes it sufficient so that we can always ensure that `Foo : Foo` holds for any trait `Foo`.
-
由 Niko Matsakis 提交于
move get_method_index into traits and give it a better name (`get_vtable_index_of_object_method`).
-
由 Niko Matsakis 提交于
-
- 02 1月, 2015 6 次提交
-
-
由 Seo Sanghyeon 提交于
-
由 Niko Matsakis 提交于
Fix orphan checking (cc #19470). (This is not a complete fix of #19470 because of the backwards compatibility feature gate.) This is a [breaking-change]. The new rules require that, for an impl of a trait defined in some other crate, two conditions must hold: 1. Some type must be local. 2. Every type parameter must appear "under" some local type. Here are some examples that are legal: ```rust struct MyStruct<T> { ... } // Here `T` appears "under' `MyStruct`. impl<T> Clone for MyStruct<T> { } // Here `T` appears "under' `MyStruct` as well. Note that it also appears // elsewhere. impl<T> Iterator<T> for MyStruct<T> { } ``` Here is an illegal example: ```rust // Here `U` does not appear "under" `MyStruct` or any other local type. // We call `U` "uncovered". impl<T,U> Iterator<U> for MyStruct<T> { } ``` There are a couple of ways to rewrite this last example so that it is legal: 1. In some cases, the uncovered type parameter (here, `U`) should be converted into an associated type. This is however a non-local change that requires access to the original trait. Also, associated types are not fully baked. 2. Add `U` as a type parameter of `MyStruct`: ```rust struct MyStruct<T,U> { ... } impl<T,U> Iterator<U> for MyStruct<T,U> { } ``` 3. Create a newtype wrapper for `U` ```rust impl<T,U> Iterator<Wrapper<U>> for MyStruct<T,U> { } ``` Because associated types are not fully baked, which in the case of the `Hash` trait makes adhering to this rule impossible, you can temporarily disable this rule in your crate by using `#![feature(old_orphan_check)]`. Note that the `old_orphan_check` feature will be removed before 1.0 is released.
-
由 Alex Crichton 提交于
This commit performs a second pass over the `std::boxed` module, taking the following actions: * `boxed` is now stable * `Box` is now stable * `BoxAny` is removed in favor of a direct `impl Box<Any>` * `Box::downcast` remains unstable while the name of the `downcast` family of methods is determined. This is a breaking change due to the removal of the `BoxAny` trait (note that the `downcast` method still exists), and existing consumers of `BoxAny` simply need to remove the import in their modules. [breaking-change]
-
由 Niko Matsakis 提交于
the only things that trait selection needs.
-
由 Corey Richardson 提交于
Doesn't yet converge on a fixed point, but generally works. A better algorithm will come with the implementation of default type parameter fallback. If inference fails to determine an exact integral or floating point type, it will set the type to i32 or f64, respectively. Closes #16968
-
由 Nick Cameron 提交于
-
- 01 1月, 2015 6 次提交
-
-
由 Jorge Aparicio 提交于
-
由 Nick Cameron 提交于
Closes #19056
-
由 Niko Matsakis 提交于
-
由 Niko Matsakis 提交于
-
由 Niko Matsakis 提交于
Rework normalization so that it works recursively, since the types extracted from an impl are potentially in need of normalization. This also lays groundwork for further cleanup in other areas by disconnecting normalization from the fulfillment context.
-
由 Niko Matsakis 提交于
-
- 31 12月, 2014 2 次提交
-
-
由 Aaron Turon 提交于
-
由 Niko Matsakis 提交于
-
- 30 12月, 2014 7 次提交
-
-
由 Niko Matsakis 提交于
-
由 Niko Matsakis 提交于
for lack of impl-trait-for-trait just a bit more targeted (don't substitute err, just drop the troublesome bound for now) -- otherwise substituting false types leads us into trouble when we normalize etc.
-
由 Niko Matsakis 提交于
-
由 Niko Matsakis 提交于
-
由 Niko Matsakis 提交于
commits but oh dear what a pain.
-
由 Niko Matsakis 提交于
Adjust tests for inferenceGet more conservative about inference for now. Seems better to err on the side of being more correct rather than less. Fix a bug in typing index expressions that was exposed as a result, and add one type annotation that is not required. Delete some random tests that were relying on old behavior and don't seem to add anything anymore.
-
由 Niko Matsakis 提交于
-