Jared Roesch
ce089e50a4
Address nits
2015-07-01 13:08:25 -07:00
Jared Roesch
9faae6a5ca
Remove Typer and ClosureTyper
...
This commit finalizes the work of the past commits by fully moving the fulfillment context into
the InferCtxt, cleaning up related context interfaces, removing the Typer and ClosureTyper
traits and cleaning up related intefaces
2015-06-30 02:41:40 -07:00
Jared Roesch
e2d7e904ca
Remove Typer + ClosureTyper impls for ParameterEnv
2015-06-30 02:40:17 -07:00
Jared Roesch
79d02895ff
Begin refactor type checking state
...
This first patch starts by moving around pieces of state related to
type checking. The goal is to slowly unify the type checking state
into a single typing context. This initial patch moves the
ParameterEnvironment into the InferCtxt and moves shared tables
from Inherited and ty::ctxt into their own struct Tables. This
is the foundational work to refactoring the type checker to
enable future evolution of the language and tooling.
2015-06-27 13:43:20 -07:00
Eduard Burtescu
ad66c215aa
rustc: switch most remaining middle::ty functions to methods.
2015-06-26 07:34:57 +03:00
Eduard Burtescu
6db5126240
rustc: make ty::mk_* constructors into methods on ty::ctxt.
2015-06-26 07:34:56 +03:00
Eduard Burtescu
59935f70e0
rustc: move some functions in middle::ty working on Ty to methods.
2015-06-26 07:34:56 +03:00
Oliver Schneider
88b03f349e
change const_val
enum and its variants to camel-case
2015-06-23 10:31:32 +02:00
Eduard Burtescu
0b58fdf925
rustc: remove Repr and UserString.
2015-06-19 01:39:26 +03:00
Eduard Burtescu
a3727559c6
rustc: use the TLS type context in Repr and UserString.
2015-06-19 01:32:44 +03:00
Eduard Burtescu
96ad4a4863
rustc: use Repr and UserString instead of ppaux::ty_to_string.
2015-06-19 01:18:43 +03:00
Eli Friedman
33b7386d39
Split TyArray into TyArray and TySlice.
...
Arrays and slices are closely related, but not that closely; making the
separation more explicit is generally more clear.
2015-06-12 16:50:13 -07:00
Eli Friedman
3c69db4c3c
Cleanup: rename middle::ty::sty and its variants.
...
Use camel-case naming, and use names which actually make sense in modern Rust.
2015-06-12 11:07:16 -07:00
Joshua Landau
ca7418b846
Removed many pointless calls to *iter() and iter_mut()
2015-06-10 21:14:03 +01:00
Sean Patrick Santos
29eb550ee6
Get associated consts working in match patterns.
2015-04-23 21:02:29 -06:00
Sean Patrick Santos
7129e8815e
Functional changes for associated constants. Cross-crate usage of associated constants is not yet working.
2015-04-23 21:02:26 -06:00
Tamir Duberstein
29ac04402d
Positive case of len()
-> is_empty()
...
`s/(?<!\{ self)(?<=\.)len\(\) == 0/is_empty()/g`
2015-04-14 20:26:03 -07:00
Tobias Bucher
97f24a8596
Make sum
and product
inherent methods on Iterator
...
In addition to being nicer, this also allows you to use `sum` and `product` for
iterators yielding custom types aside from the standard integers.
Due to removing the `AdditiveIterator` and `MultiplicativeIterator` trait, this
is a breaking change.
[breaking-change]
2015-04-08 00:26:35 +02:00
Niko Matsakis
d9530c01a7
Fallout out rustc
2015-04-01 11:22:39 -04:00
Manish Goregaokar
5eb4be4c56
Rollup merge of #23803 - richo:unused-braces, r=Manishearth
...
Pretty much what it says on the tin.
2015-03-28 18:12:06 +05:30
Richo Healey
cbce6bfbdb
cleanup: Remove unused braces in use statements
2015-03-28 02:23:20 -07:00
Alex Crichton
43bfaa4a33
Mass rename uint/int to usize/isize
...
Now that support has been removed, all lingering use cases are renamed.
2015-03-26 12:10:22 -07:00
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
Alex Crichton
fccf5a0005
Register new snapshots
2015-03-18 16:32:32 -07:00
Jorge Aparicio
8256241d3a
impl f{32,64}
2015-03-16 21:57:43 -05:00
Barosl Lee
edbc0e509f
check_match: Dereference ref x
before comparing it and some other type
...
The arity of `ref x` is always 1, so it needs to be dereferenced before
being compared with some other type whose arity is not 1.
Fixes #23009 .
2015-03-14 23:32:57 +09:00
Richo Healey
061d84399e
remove uses of as_slice where deref coercions can be used
2015-03-09 07:54:19 -07:00
Manish Goregaokar
c8c4d85b50
Rollup merge of #22764 - ivanradanov:fileline_help, r=huonw
...
When warnings and errors occur, the associated help message should not print the same code snippet.
https://github.com/rust-lang/rust/issues/21938
2015-03-05 12:38:32 +05:30
Ivan Radanov Ivanov
7496539a00
Change span_help calls to fileline_help where appropriate
2015-03-03 15:18:33 +02:00
Felix S. Klock II
5d950bd37d
Switch to eval_const_expr_partial
when check_match.rs
checks for NaN
.
2015-03-03 12:10:58 +01: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
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
Alex Crichton
5a32b4a34f
rollup merge of #22491 : Gankro/into_iter
...
Conflicts:
src/libcollections/bit.rs
src/libcollections/linked_list.rs
src/libcollections/vec_deque.rs
src/libstd/sys/common/wtf8.rs
2015-02-18 14:34:08 -08:00
Alexis
66613e26b9
make FromIterator use IntoIterator
...
This breaks all implementors of FromIterator, as they must now accept IntoIterator instead of Iterator. The fix for this is generally trivial (change the bound, and maybe call into_iter() on the argument to get the old argument).
Users of FromIterator should be unaffected because Iterators are IntoIterator.
[breaking-change]
2015-02-18 14:01:47 -05:00
Kevin Butler
2f586b9687
Opt for .cloned() over .map(|x| x.clone()) etc.
2015-02-18 00:56:07 +00:00
Eduard Burtescu
cb3c9a1e88
rustc: teach const_eval more about types.
2015-02-16 16:29:22 +02:00
bors
d4a66e9b09
Auto merge of #21970 - michaelwoerister:lang-item-call-debug-locs, r=brson
...
Resolves some issues caused by the recent LLVM update (which itself solved some issues).
Closes #19848
Closes #20798
2015-02-08 10:27:58 +00:00
Michael Woerister
93edb7c17b
debuginfo: Fix problem with debug locations of constants in match patterns.
2015-02-06 21:24:06 +01:00
GuillaumeGomez
7b973ba827
Update to last version, remove "[]" as much as possible
2015-02-06 12:03:46 +01:00
GuillaumeGomez
664c41b427
librustc has been updated
2015-02-06 11:59:10 +01:00
GuillaumeGomez
8b12d3ddf9
Libsyntax has been updated
2015-02-06 11:59:10 +01:00
Jorge Aparicio
571cc7f8e9
remove all kind annotations from closures
2015-02-04 20:06:08 -05:00
Jorge Aparicio
fd702702ee
for x in xs.into_iter()
-> for x in xs
...
Also `for x in option.into_iter()` -> `if let Some(x) = option`
2015-02-02 13:40:18 -05:00
Jorge Aparicio
d5d7e6565a
for x in xs.iter()
-> for x in &xs
2015-02-02 13:40:18 -05:00
Alfie John
00a933f9ec
More deprecating of i/u suffixes in libraries
2015-02-01 10:34:16 +00:00
Jorge Aparicio
acb8c1aaa6
remove more ExprForLoop
s
2015-01-30 10:37:44 -05:00
Jorge Aparicio
76362f0a0e
custom message for refutable patterns in for loops
2015-01-30 10:37:44 -05:00
Jorge Aparicio
c300d681bd
range(a, b).foo()
-> (a..b).foo()
...
sed -i 's/ range(\([^,]*\), *\([^()]*\))\./ (\1\.\.\2)\./g' **/*.rs
2015-01-29 07:46:44 -05:00