Commit Graph

30930 Commits

Author SHA1 Message Date
John Clements
ca05828cb7 change to new trait style for method field refs
Per @pnkfelix 's suggestion, using a trait to make these
field accesses more readable (and vastly more similar
to the original code.

oops fix new ast_map fix
2014-07-15 14:46:32 -07:00
John Clements
154ca08388 use trait rather than fns
please note the snapshot-waiting unpleasantness. I'm
unable to use the traditional #[cfg(stage0)] mechanism
to swap the new style in for later compiler stages,
because macros invocations in method positions cause
the parser to choke before cfg can strip it out.

Parenthetical note: this problem wouldn't arise with
an interleaved parsing/expansion....
2014-07-15 14:33:14 -07:00
bors
de111e69a8 auto merge of #15615 : jakub-/rust/diagnostics, r=brson 2014-07-15 21:06:12 +00:00
Alex Crichton
d2a08e9011 test: Try to fix a failing snapshot test
This test seems to yield a different error message on cross compiles, so just
ignore it when cross compiling.
2014-07-15 14:00:37 -07:00
Steve Klabnik
167533972f Fix cargo install instructions
Cargo now comes with Rust
2014-07-15 16:26:22 -04:00
bors
b422373d86 auto merge of #15426 : aochagavia/rust/str, r=alexcrichton
* Deprecated `str::from_utf8_owned` in favor of `String::from_utf8`
* Deprecated `str::from_utf8_lossy` in favor of `String::from_utf8_lossy`
* Deprecated `str::from_utf16` in favor of `String::from_utf16`
* Deprecated `str::from_utf16_lossy` in favor of `String::from_utf16_lossy`
* Deprecated `str::from_chars` in favor of `String::from_chars`
* Deprecated `str::from_char` in favor of `String::from_char` and `.to_string()`
* Deprecated `str::from_byte` in favor of `String::from_byte`

[breaking-change]
2014-07-15 18:41:05 +00:00
Adolfo Ochagavía
584fbde5d1 Fix errors 2014-07-15 20:34:16 +02:00
Adolfo Ochagavía
c6b82c7566 Deprecate str::from_utf8_lossy
Use `String::from_utf8_lossy` instead

[breaking-change]
2014-07-15 19:55:21 +02:00
Adolfo Ochagavía
1900abdd9b Deprecate str::from_utf16_lossy
Use `String::from_utf16_lossy` instead.

[breaking-change]
2014-07-15 19:55:20 +02:00
Adolfo Ochagavía
6ac4fc7fc2 Deprecate str::from_utf16
Use `String::from_utf16` instead

[breaking-change]
2014-07-15 19:55:19 +02:00
Adolfo Ochagavía
173baac495 Deprecate str::from_byte
Replaced by `String::from_byte`

[breaking-change]
2014-07-15 19:55:19 +02:00
Adolfo Ochagavía
05baf9b10c Deprecate str::from_char
Use `String::from_char` or `.to_str` instead

[breaking-change]
2014-07-15 19:55:18 +02:00
Adolfo Ochagavía
20a6894830 Deprecate str::from_chars
Use `String::from_chars` instead

[breaking-change]
2014-07-15 19:55:18 +02:00
Adolfo Ochagavía
211f1caa29 Deprecate str::from_utf8_owned
Use `String::from_utf8` instead

[breaking-change]
2014-07-15 19:55:17 +02:00
bors
cd54321c08 auto merge of #15604 : mrmonday/rust/raw-socket-libc, r=alexcrichton
This pull request adds some necessary function definitions and types for doing low level networking with Rust.
2014-07-15 17:01:07 +00:00
bors
1704ebb798 auto merge of #15421 : catharsis/rust/doc-ffi-minor-fixes, r=alexcrichton
Signed-off-by: Anton Lofgren <alofgren@op5.com>
2014-07-15 14:26:11 +00:00
Robert Clipsham
e1fc3a6f44 Add low level support for polling with librustuv.
* Adds functions for using arbitrary sockets with libuv
 * Adds types and functions required to support this.
2014-07-15 15:17:03 +01:00
bors
d336c1a3d2 auto merge of #15371 : pnkfelix/rust/fsk-render-dataflow-on-dot, r=alexcrichton
Use one or more of the following `-Z` flag options to tell the
graphviz renderer to include the corresponding dataflow sets (after
the iterative constraint propagation reaches a fixed-point solution):

  * `-Z flowgraph-print-loans` : loans computed via middle::borrowck
  * `-Z flowgraph-print-moves` : moves computed via middle::borrowck::move_data
  * `-Z flowgraph-print-assigns` : assignments, via middle::borrowck::move_data
  * `-Z flowgraph-print-all` : all of the available sets are included.

Fix #15016.
2014-07-15 12:46:14 +00:00
Felix S. Klock II
e64f594f10 Extend --pretty flowgraph=ID to include dataflow results in output.
Use one or more of the following `-Z` flag options to tell the
graphviz renderer to include the corresponding dataflow sets (after
the iterative constraint propagation reaches a fixed-point solution):

  * `-Z flowgraph-print-loans` : loans computed via middle::borrowck
  * `-Z flowgraph-print-moves` : moves computed via middle::borrowck::move_data
  * `-Z flowgraph-print-assigns` : assignments, via middle::borrowck::move_data
  * `-Z flowgraph-print-all` : all of the available sets are included.

Fix #15016.

----

This also adds a module, `syntax::ast_map::blocks`, that captures a
common abstraction shared amongst code blocks and procedure-like
things.  As part of this, moved `ast_map.rs` to subdir
`ast_map/mod.rs`, to follow our directory layout conventions.

(incorporated review feedback from huon, acrichto.)
2014-07-15 12:26:56 +02:00
bors
b74562b0ae auto merge of #15534 : steveklabnik/rust/guide_stdin, r=brson 2014-07-15 07:36:17 +00:00
bors
5cef16e9b3 auto merge of #15531 : steveklabnik/rust/guide_looping, r=brson 2014-07-15 05:56:19 +00:00
bors
2eadfe42e5 auto merge of #15511 : brson/rust/extract-rustc-back, r=alexcrichton
This was my weekend project, to start breaking up rustc. It first pulls out LLVM into `rustc_llvm`, then parts of `rustc::back` and `rustc::util` to `rustc_back`. The immediate intent is just to reduce the size of rustc, to reduce memory pressure when building rustc, but this is also a good starting point for further refactoring.

The `rustc_back` crate is definitely misnamed (`rustc::back` was never a very cohesive module anyway) - it's mostly just somewhere to stuff parts of rustc that don't have many deps. Right now it's main dep is `syntax`; it has no dep on `rustc_llvm`.

Some next steps might be to split `rustc_back` into `rustc_util` (with no `syntax` dep), and `rustc_syntax_util` (with a syntax dep); move the rest of `rustc::util` into `rustc_syntax_util`; move all of `rustc::front` to a new crate, `rustc_front`. At that point the refactoring necessary to keep extracting crates will get harder.
2014-07-15 04:16:20 +00:00
bors
b1ae09e52a auto merge of #15434 : steveklabnik/rust/guide_match, r=brson 2014-07-15 01:21:22 +00:00
kwantam
cf432b8f8f add Graphemes iterator; tidy unicode exports
- Graphemes and GraphemeIndices structs implement iterators over
  grapheme clusters analogous to the Chars and CharOffsets for chars in
  a string. Iterator and DoubleEndedIterator are available for both.

- tidied up the exports for libunicode. crate root exports are now moved
  into more appropriate module locations:
  - UnicodeStrSlice, Words, Graphemes, GraphemeIndices are in str module
  - UnicodeChar exported from char instead of crate root
  - canonical_combining_class is exported from str rather than crate root

Since libunicode's exports have changed, programs that previously relied
on the old export locations will need to change their `use` statements
to reflect the new ones. See above for more information on where the new
exports live.

closes #7043
[breaking-change]
2014-07-14 19:53:46 -04:00
kwantam
c066a1ee9f add UnicodeStrSlice width() function 2014-07-14 19:53:46 -04:00
bors
b733592adb auto merge of #15227 : alexcrichton/rust/windows-unlink, r=brson
Currently when a read-only file has unlink() invoked on it on windows, the call
will fail. On unix, however, the call will succeed. In order to have a more
consistent behavior across platforms, this error is recognized on windows and
the file is changed to read-write before removal is attempted.
2014-07-14 23:36:23 +00:00
Alex Crichton
fe67d269a5 std: Make unlink() more consistent
Currently when a read-only file has unlink() invoked on it on windows, the call
will fail. On unix, however, the call will succeed. In order to have a more
consistent behavior across platforms, this error is recognized on windows and
the file is changed to read-write before removal is attempted.
2014-07-14 14:24:50 -07:00
Nick Cameron
2bc6547a5a Borrow checking for overloaded indexing
Closes #15525
2014-07-15 09:05:06 +12:00
Brian Anderson
a008fc84aa Fix rebase fallout. Sorry. 2014-07-14 12:27:56 -07:00
Brian Anderson
3096d9bf94 rustc_llvm: Remove the inner llvm module
This makes it much saner for clients to use the library since
they don't have to worry about shadowing one llvm with another.
2014-07-14 12:27:08 -07:00
Brian Anderson
8e2e15f163 rustc_llvm: Remove an unnecessary workaround
Just some leftover junk from extracting llvm.
2014-07-14 12:27:08 -07:00
Brian Anderson
c199790077 rustc: Move util::sha2 to rustc_back 2014-07-14 12:27:08 -07:00
Brian Anderson
46266bd606 rustc: Move util::fs to rustc_back 2014-07-14 12:27:07 -07:00
Brian Anderson
be018645d8 rustc_back: Update crate docs
Indicate that anything that can be extracted here should and that things with
syntax deps should be split out someday.
2014-07-14 12:27:07 -07:00
Brian Anderson
504d4599e2 rustc: Move archive to rustc_back 2014-07-14 12:27:07 -07:00
Brian Anderson
55393493e1 rustc: Move ArchiveRO to rustc_llvm
It is a wrapper around LLVM.
2014-07-14 12:27:07 -07:00
Brian Anderson
7f6a66f77e rustc: Invert some archive deps 2014-07-14 12:27:07 -07:00
Brian Anderson
930abc1567 Extract rpath to rustc_back::rpath 2014-07-14 12:27:07 -07:00
Brian Anderson
c5a2ac1097 rustc: Invert some rpath dependencies 2014-07-14 12:27:07 -07:00
Brian Anderson
cf360f328a Extract librustc_back from librustc 2014-07-14 12:27:07 -07:00
Brian Anderson
d3096c2348 Move llvm bindings to their own crate 2014-07-14 12:27:07 -07:00
bors
e62479133b auto merge of #15666 : yorkie/rust/patch-1, r=alexcrichton 2014-07-14 18:06:22 +00:00
Yazhong Liu
7a199ba9f1 doc: missing quote in keyword Send 2014-07-15 01:26:41 +08:00
bors
61e84a5dca auto merge of #15655 : lightsofapollo/rust/glob-match-options-pub, r=alexcrichton
Not sure how to test this correctly I assume the current tests pass now because of the crate boundaries [and that this is fallout from private by default]?
2014-07-14 15:41:22 +00:00
bors
4e2da7cb79 auto merge of #15632 : masklinn/rust/patch-1, r=alexcrichton
I saw that it was bounded by `Show` but the implication is no guarantee (and had only 0.10 to test, where this behavior has been added to 0.11)
2014-07-14 13:51:29 +00:00
masklinn
ded48c5847 Document that Result.unwrap prints the Err's value
It is implied by the Show bound, but that implication can be missed.
2014-07-14 10:20:29 +02:00
James Lal
e4801da62f glob::MatchOptions struct fields should be public 2014-07-13 22:06:52 -07:00
bors
996263a015 auto merge of #15653 : erickt/rust/master, r=alexcrichton 2014-07-14 04:01:26 +00:00
bors
0a1e251e81 auto merge of #15497 : jasonthompson/rust/docs/str3, r=cmr
- for 3 implementations of into_maybe_owned()
  - is_slice()
  - is_owned()
2014-07-14 02:16:28 +00:00
bors
3d70f50b2c auto merge of #15649 : catharsis/rust/rust-libstd-examples, r=alexcrichton
This patch adds doc examples for the make_absolute, change_dir,
errors_string and args functions in the os module.
2014-07-14 00:31:30 +00:00