Eduard Burtescu
ad66c215aa
rustc: switch most remaining middle::ty functions to methods.
2015-06-26 07:34:57 +03: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
Eduard Burtescu
2e997ef2d4
rustc: remove ownership of tcx from trans' context.
2015-06-19 01:18:42 +03:00
Nick Cameron
a54bbac99a
save-analysis: fix a couple of span bugs
2015-06-15 18:10:49 +12:00
Nick Cameron
718268398e
Rebasing and bug fixing
2015-06-15 10:06:01 +12:00
Nick Cameron
92d6676412
save-analysis: use a macro for 'downcasting'
2015-06-15 08:16:35 +12:00
Nick Cameron
788fdddf37
save-analysis: API-ify struct lits
2015-06-15 08:16:35 +12:00
Nick Cameron
04b32cecac
save-analysis: merge StructRef and TypeRef
2015-06-15 08:15:29 +12:00
Nick Cameron
78c25eabd5
save-analysis: API-ify impls
2015-06-15 08:15:29 +12:00
Nick Cameron
abe5f7b95a
save-analysis: move fields to the API
2015-06-15 08:14:50 +12: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
d7f5fa4636
Conver reborrows to .iter() calls where appropriate
2015-06-11 13:56:07 +01:00
Joshua Landau
ca7418b846
Removed many pointless calls to *iter() and iter_mut()
2015-06-10 21:14:03 +01:00
Eduard Burtescu
76eaed44d9
syntax: move ast_map to librustc.
2015-06-10 02:40:45 +03:00
Simon Sapin
c160192f5f
Replace usage of String::from_str with String:from
2015-06-08 16:55:35 +02:00
Peter Elmers
1ef0ad8adc
Change &String[..] to just &String, since it coerces to &str automatically.
2015-06-02 12:21:49 -07:00
Peter Elmers
6812ca1cc8
Move EnumData to the API.
2015-06-02 12:21:20 -07:00
Nick Cameron
b2c8719341
save-analysis: move another couple of things to the API
2015-05-28 17:25:50 +12:00
Niko Matsakis
df93deab10
Make various fixes:
...
- add feature gate
- add basic tests
- adjust parser to eliminate conflict between `const fn` and associated
constants
- allow `const fn` in traits/trait-impls, but forbid later in type check
- correct some merge conflicts
2015-05-21 11:47:30 -04:00
Nick Cameron
7555e7081d
comments
2015-05-15 19:06:56 +12:00
Nick Cameron
7ca560d6ab
save-analysis: fix a bracket counting bug
2015-05-14 22:05:52 +12:00
Nick Cameron
83c6a12a54
save-analysis: start factoring out an API
2015-05-14 22:05:52 +12:00
Nick Cameron
c8ddb0f070
Extract PathCollector
2015-05-14 15:28:17 +12:00
Nick Cameron
cea73bfb15
move out function data
2015-05-14 15:28:01 +12:00
Nick Cameron
b248ee8746
Use the new-style API for external crate listings
2015-05-14 15:28:01 +12:00
Nick Cameron
4f9b04bf9e
save-analysis: move csv dumping stuff to its own module and rename
2015-05-14 15:27:32 +12:00
Garming Sam
46753dacb1
Record correct span for static mut items
2015-05-13 01:32:12 +12:00
Carol Nichols
7ec8172225
Update old uses of ~ in comments and debugging statements
2015-05-03 20:16:02 -04:00
Nick Cameron
de2a4c0113
save-analysis: fix impl functions
2015-04-29 19:21:18 +12: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
Sean Patrick Santos
b5499775d6
Structural changes for associated constants
...
Introduces new variants and types in syntax::ast, middle::ty, and middle::def.
2015-04-23 21:02:25 -06:00
Tamir Duberstein
10f15e72e6
Negative case of len()
-> is_empty()
...
`s/([^\(\s]+\.)len\(\) [(?:!=)>] 0/!$1is_empty()/g`
2015-04-14 20:26:03 -07: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
bors
926f38e588
Auto merge of #23998 - nrc:impl-self, r=nikomatsakis
...
Closes #23909
r? @nikomatsakis (or anyone else, really)
2015-04-08 09:58:05 +00:00
Jonathan S
3cbc345cf7
In librustc*, convert many uses of ast::Ident to ast::Name, fixing much of #6993 .
2015-04-03 17:46:08 -05:00
Nick Cameron
dc8a8e9beb
Check uses of Self
in impls in the compiler rather than during expansion
...
Closes #23909
2015-04-03 22:47:53 +13:00
Niko Matsakis
d9530c01a7
Fallout out rustc
2015-04-01 11:22:39 -04:00
Felix S. Klock II
2f7658a528
Refactored ty::ctxt so node_types mutations must go through ty methods.
2015-04-01 02:56:07 +02: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
Alex Crichton
eb2f1d925f
rustc: Add support for extern crate foo as bar
...
The compiler will now issue a warning for crates that have syntax of the form
`extern crate "foo" as bar`, but it will still continue to accept this syntax.
Additionally, the string `foo-bar` will match the crate name `foo_bar` to assist
in the transition period as well.
This patch will land hopefully in tandem with a Cargo patch that will start
translating all crate names to have underscores instead of hyphens.
cc #23533
2015-03-24 14:55:15 -07:00
Alex Crichton
753efb5042
rollup merge of #23601 : nikomatsakis/by-value-index
...
This is a [breaking-change]. When indexing a generic map (hashmap, etc) using the `[]` operator, it is now necessary to borrow explicitly, so change `map[key]` to `map[&key]` (consistent with the `get` routine). However, indexing of string-valued maps with constant strings can now be written `map["abc"]`.
r? @japaric
cc @aturon @Gankro
2015-03-23 15:10:50 -07:00
Aaron Turon
8389253df0
Add generic conversion traits
...
This commit:
* Introduces `std::convert`, providing an implementation of
RFC 529.
* Deprecates the `AsPath`, `AsOsStr`, and `IntoBytes` traits, all
in favor of the corresponding generic conversion traits.
Consequently, various IO APIs now take `AsRef<Path>` rather than
`AsPath`, and so on. Since the types provided by `std` implement both
traits, this should cause relatively little breakage.
* Deprecates many `from_foo` constructors in favor of `from`.
* Changes `PathBuf::new` to take no argument (creating an empty buffer,
as per convention). The previous behavior is now available as
`PathBuf::from`.
* De-stabilizes `IntoCow`. It's not clear whether we need this separate trait.
Closes #22751
Closes #14433
[breaking-change]
2015-03-23 15:01:45 -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
Eduard Burtescu
9da918548d
syntax: move MethMac to MacImplItem and combine {Provided,Required}Method into MethodTraitItem.
2015-03-11 23:39:16 +02:00
Eduard Burtescu
ce10fa8d12
syntax: rename TypeMethod to MethodSig and use it in MethDecl.
2015-03-11 23:39:16 +02:00
Eduard Burtescu
f98b176314
syntax: gather common fields of impl & trait items into their respective types.
2015-03-11 23:39:16 +02:00
Eduard Burtescu
98491827b9
syntax: move indirection around {Trait,Impl}Item, from within.
2015-03-11 23:39:15 +02:00