Commit Graph

76 Commits

Author SHA1 Message Date
Guillaume Gomez
60133aa6dd Remove macro, import function and enum 2015-07-14 19:53:09 +02:00
Guillaume Gomez
31262c206e Arguments are now passed directly to the function instead of the enum variants 2015-07-14 16:32:43 +02:00
Guillaume Gomez
c5f7c19cf2 End of error code spanning centralization 2015-07-14 15:37:52 +02:00
Guillaume Gomez
f52a87c44e Centralize error spaning and add an enum to make this treatment easier 2015-07-13 19:32:45 +02:00
Guillaume Gomez
cbf0b1b399 Remove warnings by centralizing error codes usage 2015-07-13 02:05:02 +02:00
Guillaume Gomez
48ee57e656 Update error codes 2015-07-13 00:57:16 +02:00
Guillaume Gomez
8b731a5cac Add error codes 2015-07-13 00:31:09 +02:00
Guillaume Gomez
c3fd0e1229 Remove token::get_name when unneeded 2015-07-10 00:00:08 +02:00
bors
f451812763 Auto merge of #26385 - nham:fix_25396, r=alexcrichton
Currently in the E0252 message, traits and modules are all called types (as in "a type named `Foo` has already been imported", even when `Foo` was a trait or module). This commit changes that to additionally detect when the import in question is a trait or module and report it accordingly.

Fixes #25396.
2015-06-18 16:17:04 +00:00
Nick Hamann
b637f6b1bd Fix the E0252 error message to use better names for things.
Currently in the E0252 message, traits and modules are all called types
(as in "a type named `Foo` has already been imported", even when `Foo` was
a trait or module). This commit changes that to additionally detect when
the import in question is a trait or module and report it accordingly.

Fixes #25396.
2015-06-17 19:41:55 -05:00
Nick Hamann
0c22cd7906 Fix error message for E0256 in certain cases.
Previously, it said "import `Foo` conflicts with existing submodule" even
when it was a type alias, enum, or trait. The message now says the conflict
is with "type in this module" in the case of the first two, and "trait in
this module" for the last one.

Fixes #24081.
2015-06-16 18:55:52 -05:00
Joshua Landau
d7f5fa4636 Conver reborrows to .iter() calls where appropriate 2015-06-11 13:56:07 +01:00
bors
feac9f1c7b Auto merge of #24818 - tbelaire:double-import, r=nrc
This isn't quite right, but it's interesting.
2015-05-12 08:54:40 +00:00
Theo Belaire
db9d018424 Fixed some nits 2015-05-01 11:37:38 -04:00
Tamir Duberstein
8c58fe1739 Fallout 2015-04-29 08:55:31 -07:00
Theo Belaire
5c05278fec Fixed types, and slimmed down code
I don't this we need to print the definition of the
imported value too, though it's quite possible.
2015-04-25 15:45:29 -04:00
Theo Belaire
69a5c379df Maybe it works
Still compiling, but I think I have it!
2015-04-25 15:11:56 -04:00
Theo Belaire
168615f869 Now passing in the ImportResolver to check_conflict...
It compiles, yay.
2015-04-25 14:35:47 -04:00
Theo Belaire
74648b5d64 First attempt at fixing #20591
This isn't quite right, but it's interesting.
2015-04-25 14:09:41 -04: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
Niko Matsakis
d9530c01a7 Fallout out rustc 2015-04-01 11:22:39 -04:00
Alex Crichton
28a6b16130 rollup merge of #23741: alexcrichton/remove-int-uint
Conflicts:
	src/librustc/middle/ty.rs
	src/librustc_trans/trans/adt.rs
	src/librustc_typeck/check/mod.rs
	src/libserialize/json.rs
	src/test/run-pass/spawn-fn.rs
2015-03-27 10:10:05 -07:00
Alexis Beingessner
1b98f6da7a default => or_insert per RFC 2015-03-27 07:42:03 -04: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
Aaron Turon
5fe0bb743a Future-proof indexing on maps: remove IndexMut
This commit removes the `IndexMut` impls on `HashMap` and `BTreeMap`, in
order to future-proof the API against the eventual inclusion of an
`IndexSet` trait.

Ideally, we would eventually be able to support:

```rust
map[owned_key] = val;
map[borrowed_key].mutating_method(arguments);
&mut map[borrowed_key];
```

but to keep the design space as unconstrained as possible, we do not
currently want to support `IndexMut`, in case some other strategy will
eventually be needed.

Code currently using mutating index notation can use `get_mut` instead.

[breaking-change]

Closes #23448
2015-03-20 10:46:31 -07:00
Nick Cameron
2df1ceb001 resolve: factor out resolve imports to its own module 2015-03-16 11:03:54 +13:00