Niko Matsakis
8e58af4004
Fallout in stdlib, rustdoc, rustc, etc. For most maps, converted uses of
...
`[]` on maps to `get` in rustc, since stage0 and stage1+ disagree about
how to use `[]`.
2015-03-23 16:55:45 -04:00
Niko Matsakis
bc1dde468c
Compiler and trait changes to make indexing by value.
2015-03-23 16:54:28 -04:00
Niko Matsakis
0947f4076d
Move unsafety out of the subtyping relation and into coercion.
2015-03-17 17:29:07 -04:00
Niko Matsakis
277b4f035a
Fix soundness hole when unsizing boxes.
2015-03-17 08:34:25 -04:00
Eduard Burtescu
d31b9ebef5
Implement <T>::method
UFCS expression syntax.
2015-02-24 14:16:02 +02:00
Eduard Burtescu
5a6a9ed792
rustc: combine partial_def_map and last_private_map into def_map.
2015-02-24 14:16:02 +02:00
Niko Matsakis
68e5bb3f2c
Remove remaining uses of []
. This time I tried to use deref coercions where possible.
2015-02-20 14:08:14 -05:00
Alex Crichton
1506b34e0c
rollup merge of #22286 : nikomatsakis/variance-4b
...
Conflicts:
src/librustc/middle/infer/combine.rs
src/librustc_typeck/check/wf.rs
2015-02-18 15:52:01 -08:00
Alex Crichton
231eeaa35b
rollup merge of #22502 : nikomatsakis/deprecate-bracket-bracket
...
Conflicts:
src/libcollections/slice.rs
src/libcollections/str.rs
src/librustc/middle/lang_items.rs
src/librustc_back/rpath.rs
src/librustc_typeck/check/regionck.rs
src/libstd/ffi/os_str.rs
src/libsyntax/diagnostic.rs
src/libsyntax/parse/parser.rs
src/libsyntax/util/interner.rs
src/test/run-pass/regions-refcell.rs
2015-02-18 15:48:40 -08:00
Niko Matsakis
9ea84aeed4
Replace all uses of &foo[]
with &foo[..]
en masse.
2015-02-18 17:36:03 -05:00
Niko Matsakis
48c70d6863
Replace assert_no_late_bound_regions
with
...
`no_late_bound_regions().unwrap()`, which allows us to write code that
doesn't necessarily *fail* when there are higher-ranked trait bounds.
2015-02-18 15:23:34 -05:00
Niko Matsakis
60f507be45
Fallout: remove unused type and region parameters.
2015-02-18 10:25:28 -05:00
Jorge Aparicio
17bc7d8d5b
cleanup: replace as[_mut]_slice()
calls with deref coercions
2015-02-05 13:45:01 -05:00
Jorge Aparicio
d5d7e6565a
for x in xs.iter()
-> for x in &xs
2015-02-02 13:40:18 -05:00
Niko Matsakis
2f465869fd
Separate out the unboxed closure table into two tables, so that we can
...
generate the closure type and closure kind separately.
2015-02-01 06:13:06 -05:00
Alex Crichton
64dd7be2c5
Merge remote-tracking branch 'origin/master' into rollup
...
Conflicts:
src/liballoc/lib.rs
src/libcore/ops.rs
2015-01-30 14:55:34 -08:00
Jorge Aparicio
a873316277
remove dead code
2015-01-30 10:37:44 -05:00
Jorge Aparicio
9fdc0effd2
implement for loop desugaring
2015-01-30 10:36:31 -05:00
Niko Matsakis
80c793c1d3
Allow individual upvars to be inferred to move semantics. Fixes #21603 .
2015-01-30 05:56:39 -05:00
Niko Matsakis
2f29cdeb4b
Remove the capture mode map and just store the capture mode for individual variables.
...
Also add test. Fixes #16749 .
2015-01-30 05:56:39 -05:00
Jorge Aparicio
788181d405
s/Show/Debug/g
2015-01-29 07:49:02 -05:00
Jorge Aparicio
7d661af9c8
for x in range(a, b)
-> for x in a..b
...
sed -i 's/in range(\([^,]*\), *\([^()]*\))/in \1\.\.\2/g' **/*.rs
2015-01-29 07:47:37 -05:00
Eduard Burtescu
11ef6f1349
Remove "unboxed" attribute in code referring to new closures.
2015-01-26 04:15:09 +02:00
Huon Wilson
2e888d0341
Add the span of the operator itself to ast::BinOp.
2015-01-25 00:33:50 +11:00
Eduard Burtescu
2cdc86c180
syntax: add fully qualified UFCS expressions.
2015-01-15 18:51:14 +02:00
Jorge Aparicio
517f1cc63c
use slicing sugar
2015-01-07 17:35:56 -05:00
Alex Crichton
771fe9026a
rollup merge of #20607 : nrc/kinds
...
Conflicts:
src/libcore/array.rs
src/libcore/cell.rs
src/libcore/prelude.rs
src/libstd/path/posix.rs
src/libstd/prelude/v1.rs
src/test/compile-fail/dst-sized-trait-param.rs
2015-01-06 15:34:10 -08:00
Alex Crichton
0b3b957554
rollup merge of #20645 : nikomatsakis/rustbook-ice
...
Conflicts:
src/librustc/middle/mem_categorization.rs
src/librustc/middle/ty.rs
src/librustc_trans/trans/base.rs
src/librustc_trans/trans/expr.rs
src/librustc_trans/trans/foreign.rs
src/librustc_typeck/check/mod.rs
2015-01-06 15:29:09 -08:00
Alex Crichton
5c3ddcb15d
rollup merge of #20481 : seanmonstar/fmt-show-string
...
Conflicts:
src/compiletest/runtest.rs
src/libcore/fmt/mod.rs
src/libfmt_macros/lib.rs
src/libregex/parse.rs
src/librustc/middle/cfg/construct.rs
src/librustc/middle/dataflow.rs
src/librustc/middle/infer/higher_ranked/mod.rs
src/librustc/middle/ty.rs
src/librustc_back/archive.rs
src/librustc_borrowck/borrowck/fragments.rs
src/librustc_borrowck/borrowck/gather_loans/mod.rs
src/librustc_resolve/lib.rs
src/librustc_trans/back/link.rs
src/librustc_trans/save/mod.rs
src/librustc_trans/trans/base.rs
src/librustc_trans/trans/callee.rs
src/librustc_trans/trans/common.rs
src/librustc_trans/trans/consts.rs
src/librustc_trans/trans/controlflow.rs
src/librustc_trans/trans/debuginfo.rs
src/librustc_trans/trans/expr.rs
src/librustc_trans/trans/monomorphize.rs
src/librustc_typeck/astconv.rs
src/librustc_typeck/check/method/mod.rs
src/librustc_typeck/check/mod.rs
src/librustc_typeck/check/regionck.rs
src/librustc_typeck/collect.rs
src/libsyntax/ext/format.rs
src/libsyntax/ext/source_util.rs
src/libsyntax/ext/tt/transcribe.rs
src/libsyntax/parse/mod.rs
src/libsyntax/parse/token.rs
src/test/run-pass/issue-8898.rs
2015-01-06 15:22:24 -08:00
Nick Cameron
9f07d055f7
markers -> marker
2015-01-07 12:10:31 +13:00
Nick Cameron
0c7f7a5fb8
fallout
2015-01-07 12:02:52 +13:00
Sean McArthur
44440e5c18
core: split into fmt::Show and fmt::String
...
fmt::Show is for debugging, and can and should be implemented for
all public types. This trait is used with `{:?}` syntax. There still
exists #[derive(Show)].
fmt::String is for types that faithfully be represented as a String.
Because of this, there is no way to derive fmt::String, all
implementations must be purposeful. It is used by the default format
syntax, `{}`.
This will break most instances of `{}`, since that now requires the type
to impl fmt::String. In most cases, replacing `{}` with `{:?}` is the
correct fix. Types that were being printed specifically for users should
receive a fmt::String implementation to fix this.
Part of #20013
[breaking-change]
2015-01-06 14:49:42 -08:00
Nick Cameron
e970db37a9
Remove old slicing hacks and make new slicing work
2015-01-07 10:49:00 +13:00
Nick Cameron
f7ff37e4c5
Replace full slice notation with index calls
2015-01-07 10:46:33 +13:00
Nick Cameron
503709708c
Change std::kinds
to std::markers
; flatten std::kinds::marker
...
[breaking-change]
2015-01-07 09:45:28 +13:00
Niko Matsakis
2486d93e5b
Fix ICE that @steveklabnik encountered in rust-ice. The problems turned out to be that were being very loose with bound regions in trans (we were basically just ignoring and flattening binders). Since binders are significant to subtyping and hence to trait selection, this can cause a lot of problems. So this patch makes us treat them more strictly -- for example, we propagate binders, and avoid skipping past the Binder
by writing foo.0
.
...
Fixes #20644 .
2015-01-06 13:42:42 -05:00
Jorge Aparicio
4e9c50e081
remove AdjustAddEnv
2015-01-05 17:22:15 -05:00
Jorge Aparicio
5f7f2c9a05
remove ty_closure
2015-01-05 17:22:15 -05:00
Jorge Aparicio
351409a622
sed -i -s 's/#\[deriving(/#\[derive(/g' **/*.rs
2015-01-03 22:54:18 -05:00
Jorge Aparicio
8c5bb80d9b
sed -i -s 's/\bmod}/self}/g' **/*.rs
2015-01-03 22:42:37 -05:00
Niko Matsakis
7474be0660
Make ty::ParameterEnvironment
, not ty::ctxt
, implement Typer
and
...
`UnboxedClosureTyper`. This requires adding a `tcx` field to
`ParameterEnvironment` but generally simplifies everything since we
only need to pass along an `UnboxedClosureTyper` or `Typer`.
2015-01-03 07:01:21 -05:00
Niko Matsakis
83ef3042de
Modify type_known_to_meet_builtin_bound
so that it doesn't suppress overflow,
...
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`.
2015-01-03 07:01:21 -05:00
Niko Matsakis
429d9cce1b
Be more tolerant of errors in EUV so we can run it during typeck.
2015-01-03 07:00:51 -05:00
Niko Matsakis
f7abf47058
Re-introduce McResult<>
as a way of aborting mem-categorization (and
...
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.
2015-01-03 07:00:51 -05:00
bors
1f887c8c57
auto merge of #20412 : nikomatsakis/rust/assoc-types, r=aturon
...
These changes fix various problems encountered getting japaric's `at-iter` branch to work. This branch converts the `Iterator` trait to use an associated type.
2015-01-02 08:11:19 +00:00
Niko Matsakis
78f848cde5
Refactor the Typer interface to separate out UnboxedClosureTyper methods, which are
...
the only things that trait selection needs.
2015-01-01 18:48:26 -05:00
Nick Cameron
7e2b9ea235
Fallout - change array syntax to use ;
2015-01-02 10:28:19 +13:00
Niko Matsakis
0b64e5796b
Make ExprUseVisitor<..> use inherited parameter environments.
2014-12-30 09:32:42 -05:00
Nick Cameron
4e2afb0052
Remove ExprSlice by hacking the compiler
...
[breaking-change]
The `mut` in slices is now redundant. Mutability is 'inferred' from position. This means that if mutability is only obvious from the type, you will need to use explicit calls to the slicing methods.
2014-12-30 13:06:25 +13:00
Nick Cameron
ed8f503911
Add hypothetical support for ranges with only an upper bound
...
Note that this doesn't add the surface syntax.
2014-12-30 13:06:24 +13:00