Commit Graph

74 Commits

Author SHA1 Message Date
Niko Matsakis
3c07b46118 Pass the mir map to trans 2015-11-03 04:34:59 -05:00
Niko Matsakis
b48b6eaf75 fix bug in hir,identified 2015-10-22 16:58:08 -04:00
Nick Cameron
401c80dab1 save-analysis: don't recompute crate name 2015-10-21 12:04:48 +13:00
Nick Cameron
a62a529eea review comments 2015-10-09 21:44:44 +13:00
Nick Cameron
2b4f28e531 Misc fixups 2015-10-09 11:53:42 +13:00
Nick Cameron
21205f4f9e Cache ids between lowering runs
So that lowering is reproducible
2015-10-09 11:53:42 +13:00
Nick Cameron
20083c1e1f Move for loop desugaring to lowering 2015-10-09 11:53:41 +13:00
Nick Cameron
56713a1684 Add a lowering context 2015-10-09 11:53:41 +13:00
Vadim Petrochenkov
f284cbc7af Cleanup interfaces of Name, SyntaxContext and Ident
Make sure Name, SyntaxContext and Ident are passed by value
Make sure Idents don't serve as keys (or parts of keys) in maps, Ident comparison is not well defined
2015-09-24 23:05:02 +03:00
Vadim Petrochenkov
40ce80484c Remove random Idents outside of libsyntax 2015-09-23 20:04:49 +03:00
Nick Cameron
76856e19ff Add an early lint pass for lints that operate on the AST
There is a minor [breaking-change] for lint authors - some functions which were previously defined on `lint::Context` have moved to a trait - `LintContext`, you may need to import that trait to avoid name resolution errors.
2015-09-17 12:16:46 +12:00
Nick Cameron
e9f1b06329 Use ast attributes every where (remove HIR attributes).
This could be a [breaking-change] if your lint or syntax extension (is that even possible?) uses HIR attributes or literals.
2015-09-16 10:57:06 +12:00
Nick Cameron
facdf2ebb1 Add an intital HIR and lowering step 2015-09-03 10:02:36 +12:00
Felix S. Klock II
e050fc21b9 Rename the unstable option --xpretty to --unpretty
(Inspired by discussion with Gankro.)
2015-07-30 01:33:38 +02:00
Wesley Wiser
93ddee6cee Change some instances of .connect() to .join() 2015-07-10 19:40:46 -04:00
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
bc383f6294 rustc: enforce stack discipline on ty::ctxt. 2015-06-19 01:18:42 +03:00
Eduard Burtescu
2e997ef2d4 rustc: remove ownership of tcx from trans' context. 2015-06-19 01:18:42 +03:00
Eduard Burtescu
76eaed44d9 syntax: move ast_map to librustc. 2015-06-10 02:40:45 +03: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
Alex Crichton
f92e7abefd rollup merge of #23860: nikomatsakis/copy-requires-clone
Conflicts:
	src/test/compile-fail/coherence-impls-copy.rs
2015-04-01 18:37:54 -07:00
Alex Crichton
e9bacbaa2c rollup merge of #23951: alexcrichton/splitn
This commit is an implementation of [RFC 979][rfc] which changes the meaning of
the count parameter to the `splitn` function on strings and slices. The
parameter now means the number of items that are returned from the iterator, not
the number of splits that are made.

[rfc]: https://github.com/rust-lang/rfcs/pull/979

Closes #23911
[breaking-change]
2015-04-01 13:30:08 -07:00
Alex Crichton
e98dce3e00 std: Changing the meaning of the count to splitn
This commit is an implementation of [RFC 979][rfc] which changes the meaning of
the count parameter to the `splitn` function on strings and slices. The
parameter now means the number of items that are returned from the iterator, not
the number of splits that are made.

[rfc]: https://github.com/rust-lang/rfcs/pull/979

Closes #23911
[breaking-change]
2015-04-01 13:29:42 -07:00
Manish Goregaokar
6a3e8447eb Rollup merge of #23924 - nrc:unqual-assoc3, r=alexcrichton
Basically stuff I did for unqualified assoc types which is worth landing by itself.
2015-04-02 00:40:39 +05:30
Niko Matsakis
d9530c01a7 Fallout out rustc 2015-04-01 11:22:39 -04:00
Nick Cameron
a5479622ea Pretty print ids for assoc items 2015-04-01 12:40:54 +13:00
Alex Crichton
ac77392f8a std: Stabilize last bits of io::Error
This commit stabilizes a few remaining bits of the `io::Error` type:

* The `Error::new` method is now stable. The last `detail` parameter was removed
  and the second `desc` parameter was generalized to `E: Into<Box<Error>>` to
  allow creating an I/O error from any form of error. Currently there is no form
  of downcasting, but this will be added in time.

* An implementation of `From<&str> for Box<Error>` was added to liballoc to
  allow construction of errors from raw strings.

* The `Error::raw_os_error` method was stabilized as-is.

* Trait impls for `Clone`, `Eq`, and `PartialEq` were removed from `Error` as it
  is not possible to use them with trait objects.

This is a breaking change due to the modification of the `new` method as well as
the removal of the trait implementations for the `Error` type.

[breaking-change]
2015-03-31 16:12:48 -07:00
Alex Crichton
981bf5f690 Fallout of std::old_io deprecation 2015-03-13 10:00:28 -07:00
Alex Crichton
95d904625b std: Deprecate std::old_io::fs
This commit deprecates the majority of std::old_io::fs in favor of std::fs and
its new functionality. Some functions remain non-deprecated but are now behind a
feature gate called `old_fs`. These functions will be deprecated once
suitable replacements have been implemented.

The compiler has been migrated to new `std::fs` and `std::path` APIs where
appropriate as part of this change.
2015-03-04 15:59:30 -08:00
Michael Woerister
2f8865556b Encode codemap and span information in crate metadata.
This allows to create proper debuginfo line information for items inlined from other crates (e.g. instantiations of generics).
Only the codemap's 'metadata' is stored in a crate's metadata. That is, just filename, line-beginnings, etc. but not the actual source code itself. We are thus missing the opportunity of making Rust the first "open-source-only" programming language out there. Pity.
2015-03-04 09:50:09 +01:00
bors
67eb38ee4c Auto merge of #22466 - Kimundi:str_pattern_ai_safe, r=aturon
This is not a complete implementation of the RFC:

- only existing methods got updated, no new ones added
- doc comments are not extensive enough yet
- optimizations got lost and need to be reimplemented

See https://github.com/rust-lang/rfcs/pull/528

Technically a

[breaking-change]
2015-02-22 22:45:46 +00: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
Marvin Löbel
c8dd2d066d Addressed PR comments 2015-02-20 00:58:15 +01:00
Niko Matsakis
9ea84aeed4 Replace all uses of &foo[] with &foo[..] en masse. 2015-02-18 17:36:03 -05:00
Jorge Aparicio
17bc7d8d5b cleanup: replace as[_mut]_slice() calls with deref coercions 2015-02-05 13:45:01 -05:00
Jorge Aparicio
571cc7f8e9 remove all kind annotations from closures 2015-02-04 20:06:08 -05:00
Alfie John
8f4844d58b More deprecating of i/u suffixes 2015-02-02 23:37:01 +00:00
Alex Crichton
0cdde6e5e0 std: Stabilize FromStr and parse
This commits adds an associated type to the `FromStr` trait representing an
error payload for parses which do not succeed. The previous return value,
`Option<Self>` did not allow for this form of payload. After the associated type
was added, the following attributes were applied:

* `FromStr` is now stable
* `FromStr::Err` is now stable
* `FromStr::from_str` is now stable
* `StrExt::parse` is now stable
* `FromStr for bool` is now stable
* `FromStr for $float` is now stable
* `FromStr for $integral` is now stable
* Errors returned from stable `FromStr` implementations are stable
* Errors implement `Display` and `Error` (both impl blocks being `#[stable]`)

Closes #15138
2015-01-30 08:52:44 -08:00
Jorge Aparicio
788181d405 s/Show/Debug/g 2015-01-29 07:49:02 -05:00
Alex Crichton
3a07f859b8 Fallout of io => old_io 2015-01-26 16:01:16 -08:00
Eduard Burtescu
7dbefcec94 rustc_driver: fix fallout of merging ast::ViewItem into ast::Item. 2015-01-21 16:27:26 +02:00
Felix S. Klock II
82eefe3687 add --xpretty flowgraph,unlabelled variant. 2015-01-12 22:42:12 +01:00
Nick Cameron
55d5c46d3a Make the compilation process more easily customisable 2015-01-12 12:53:07 +13:00
Manish Goregaokar
7e87ea9fc5 librustc::session : Make DebuggingOpts use the options! macro 2015-01-08 13:38:43 +05:30
Jorge Aparicio
7d72719efc fix the &mut _ patterns 2015-01-07 19:26:36 -05:00
Jorge Aparicio
517f1cc63c use slicing sugar 2015-01-07 17:35:56 -05:00