Commit Graph

11 Commits

Author SHA1 Message Date
Kevin Butler
190d8bdbc6 libsyntax: Fix snake_case errors.
A number of functions/methods have been moved or renamed to align
better with rust standard conventions.

syntax::ext::mtwt::xorPush => xor_push
syntax::parse::parser::Parser => Parser::new

[breaking-change]
2014-05-30 17:55:41 +01:00
Alex Crichton
ab92ea526d std: Modernize the local_data api
This commit brings the local_data api up to modern rust standards with a few key
improvements:

* The `pop` and `set` methods have been combined into one method, `replace`

* The `get_mut` method has been removed. All interior mutability should be done
  through `RefCell`.

* All functionality is now exposed as a method on the keys themselves. Instead
  of importing std::local_data, you now use "key.replace()" and "key.get()".

* All closures have been removed in favor of RAII functionality. This means that
  get() and get_mut() no long require closures, but rather return
  Option<SmartPointer> where the smart pointer takes care of relinquishing the
  borrow and also implements the necessary Deref traits

* The modify() function was removed to cut the local_data interface down to its
  bare essentials (similarly to how RefCell removed set/get).

[breaking-change]
2014-05-07 23:43:39 -07:00
Alex Crichton
f3682b5639 syntax: Fix fallout of removing get() 2014-03-22 08:48:20 -07:00
Alex Crichton
da3625161d Removing imports of std::vec_ng::Vec
It's now in the prelude.
2014-03-20 09:30:14 -07:00
Daniel Micay
14f656d1a7 rename std::vec_ng -> std::vec
Closes #12771
2014-03-20 04:25:32 -04:00
bors
4ca51aeea7 auto merge of #12770 : eddyb/rust/drop-tld, r=cmr
Sadly, this seems to make memory usage worse (unless `Vec<T>` makes it worse and this PR doesn't change that much, which is entirely possible).
2014-03-19 13:01:49 -07:00
Eduard Burtescu
c04d4846f2 Discard MTWT & interner tables from TLD after they stop being useful. 2014-03-19 07:28:18 +02:00
Steven Fackler
0f2d46f396 Docify std::vec_ng
I also removed a couple of methods that were silly and added sort.
2014-03-18 22:03:17 -07:00
Laurent Bonnans
695114ea2c rustc: disallow trailing parentheses for nullary enum variants
Fixes #12560
2014-03-17 12:11:22 +01:00
Eduard Burtescu
cdc18b96d6 Remove Rc's borrow method to avoid conflicts with RefCell's borrow in Rc<RefCell<T>>. 2014-03-13 14:21:45 +02:00
Edward Wang
2302ce903d Refactor and fix FIXME's in mtwt hygiene code
- Moves mtwt hygiene code into its own file
- Fixes FIXME's which leads to ~2x speed gain in expansion pass
- It is now @-free
2014-03-05 22:45:51 +08:00