Commit Graph

34611 Commits

Author SHA1 Message Date
bors
829680840c auto merge of #17513 : dradtke/rust/master, r=kballard
Looks like I made my previous PR a little too hastily. =)

This PR fixes a couple issues that I discovered with my previous revision:

1. Updated the errorformat to ignore "pointer lines" so that they don't show up in the output (with quickfix jumping, they're redundant and unnecessary).
2. Renamed a couple variables to be more in line with Cargo's terminology (`g:cargo_toml_name` should now be `g:cargo_manifest_name`).
3. Added support for errors reported with absolute paths (looks to be the case when compiling an executable instead of a library).
4. Most importantly, added support for errors reported while compiling a dependency. When building a Cargo package with local dependencies, if one of those dependencies failed to compile, the quickfix would be completely broken as it assumed that all errors were relative to the local manifest, or the closest Cargo.toml. With this update, it now pays attention to lines that end with `(file://<path>)`, and from then on adjusts all errors to be relative to `<path>`.

As a side note, that `<path>` output is somewhat broken on Windows. While `file:///home/damien/...` on *Nix is a valid URI, `file:///C:/Users/damien/...` on Windows is not, because `C:/` (or whatever the drive is) should take the place of the third slash which is *Nix's root, not be appended to it. I added a workaround for this in my script, but I figured I'd mention it to see if this is a bug in how Rust formats paths.
2014-11-22 06:31:43 +00:00
bors
2a4c0100fe auto merge of #19122 : Kintaro/rust/remove_struct_variant, r=jakub-
The struct_variant is not gated anymore. This commit just removes it and the resulting warnings when compiling rust. Now compiles with the snapshot from 11/18 (as opposed to PR #19014)
2014-11-22 04:06:45 +00:00
Jashank Jeremy
ab854481ba args() doc: Fix a documentation line. 2014-11-22 13:34:38 +11:00
bors
2af82f7530 auto merge of #19117 : jmesmon/rust/mk-cfg-suffix, r=cmr
Right now we'll end up globbing them into the accepted targets and (ever worse) they will override the make variables of real target files because we `include`d everything in that directory.

As a side effect, editors get a better hint on file types.
2014-11-22 01:46:46 +00:00
bors
81eeec0941 auto merge of #18603 : brson/rust/stdchar, r=aturon
* Deprecate the free functions in favor of methods, except the two ctors `from_u32` and `from_digit`, whose methods are deprecated.
* Mark the `Char` and `UnicodeChar` traits experimental until we decide for sure that we won't have some sort of inherent methods for primitives.
* The `UnicodeChar` methods related to numerics are now called e.g. `is_numeric` to match the 'numeric' unicode character class, and the `*_digit_radix` methods on `Char` now just called `*_digit`.
* `len_utf8_bytes` -> `len_utf8`
* Converted methods to take self by-value
* Converted `escape_default` and `escape_unicode` to iterators over chars.
* Renamed `is_XID_start`, `is_XID_continue` to `is_xid_start`, `is_xid_continue` to match conventions

This also converts `encode_utf8` and `encode_utf16` to return iterators. I suspect this is not the final form of these methods. Perf is worse (numbers in the commit). Many of the uses ended up being awkward, copying into a buffer then writing that buffer to a `Writer`. It might be more appropriate for these to return `Reader`s instead, but that type is defined in `std`.

Note: although I *did* add the `from_u32` ctor to the `Char` trait, I deprecated it again later, preferring the free ctors.

I've been sitting on this for a while.

cc @aturon
2014-11-21 23:16:48 +00:00
Alexander Light
69861df831 Shuffle locations for Deref
Remove both `strong_count` and `weak_count` from `Weak`s and make the
methods bare functions so as not to cause trouble with `deref`.
2014-11-21 17:56:33 -05:00
Aaron Turon
1e66164210 libs: add std::os::windows module
The new `std::os::windows` module exposes several extension traits
for extracting file descriptors, sockets, and handles from `std::io`
types.
2014-11-21 14:24:30 -08:00
Alex Crichton
1684419897 Register new snapshots 2014-11-21 14:15:33 -08:00
Aaron Turon
6733d8b483 Fallout from deprecation 2014-11-21 14:10:13 -08:00
Aaron Turon
7ce2d9c3fa libs: stabilize ascii module
This is an initial API stabilization pass for `std::ascii`. Aside from
some renaming to match conversion conventions, and deprecations in favor
of using iterators directly, almost nothing is changed here. However,
the static case conversion tables that were previously public are now private.

The stabilization of the (rather large!) set of extension traits is left
to a follow-up pass, because we hope to land some more general machinery
that will provide the same functionality without custom traits.

[breaking-change]
2014-11-21 14:10:13 -08:00
Brian Anderson
75ffadf8b6 core: Convert a 'failure' to 'panic' in docs 2014-11-21 13:18:08 -08:00
Brian Anderson
879af89baf core: Update docs for escape_unicode, escape_default 2014-11-21 13:18:08 -08:00
Brian Anderson
73622f8fdf unicode: Remove unused non_snake_case allows. 2014-11-21 13:18:08 -08:00
Brian Anderson
f39c29d0bc unicode: Rename is_XID_start to is_xid_start, is_XID_continue to is_xid_continue 2014-11-21 13:18:08 -08:00
Brian Anderson
76ddd2b154 unicode: Add stability attributes to u_char
Free functions deprecated. UnicodeChar experimental pending
final decisions about prelude.
2014-11-21 13:18:08 -08:00
Brian Anderson
d6ee804b63 unicode: Convert UnicodeChar methods to by-value
Extension traits for primitive types should be by-value.

[breaking-change]
2014-11-21 13:18:08 -08:00
Brian Anderson
aad2461604 core: Convert Char::escape_default, escape_unicode to iterators
[breaking-change]
2014-11-21 13:18:08 -08:00
Brian Anderson
ca1820b1fc core: Convert Char methods to by-val self
Methods on primitmive Copy types generally should take `self`.

[breaking-change]
2014-11-21 13:18:08 -08:00
Brian Anderson
5928f6c8b6 Fix various deprecation warnings from char changes 2014-11-21 13:18:04 -08:00
Brian Anderson
b577e4c8d8 core: Mark remaining Char methods unstable
The `Char` trait itself may go away in favor of primitive inherent
methods. Still some questions about whether the preconditions are
following the final error handling conventions.
2014-11-21 13:17:09 -08:00
Brian Anderson
95c3f618c0 core: Deprecated remaining free functions in char
Prefer the methods.
2014-11-21 13:17:09 -08:00
Brian Anderson
4dd1724576 core: Add stability attributes to char::from_digit and from_u32
For now we are preferring free functions for primitive ctors,
so they are marked 'unstable' pending final decision. The
methods on `Char` are 'deprecated'.
2014-11-21 13:17:09 -08:00
Brian Anderson
f6607a20c4 core: Add Char::len_utf16
Missing method to pair with len_utf8.
2014-11-21 13:17:09 -08:00
Brian Anderson
0150fa4b1b core: Rename Char::len_utf8_bytes to Char::len_utf8
"bytes" is redundant.

Deprecate the old.
2014-11-21 13:17:09 -08:00
Brian Anderson
acb5fefd6d core: Rename Char::is_digit_radix to is_digit
This fits the naming of `to_digit` and `from_digit`. Leave
the old name deprecated.
2014-11-21 13:17:09 -08:00
Brian Anderson
c2aff692fa unicode: Rename UnicodeChar::is_digit to is_numeric
'Numeric' is the proper name of the unicode character class,
and this frees up the word 'digit' for ascii use in libcore.

Since I'm going to rename `Char::is_digit_radix` to
`is_digit`, I am not leaving a deprecated method in place,
because that would just cause name clashes, as both
`Char` and `UnicodeChar` are in the prelude.

[breaking-change]
2014-11-21 13:17:04 -08:00
bors
cd75847437 auto merge of #18822 : scialex/rust/better-rustdoc, r=alexcrichton
Changed `rustdoc` so that if we do not have the `strip-private` pass
enabled private modules will be included in the generated documentation

I added this because it is useful to be able to read the documentation in the very nice `rustdoc` web interface when doing internal work on a project. In this case we want the `rustdoc` to include modules that are hidden from consumers. Since this is not currently possible I added it here.
2014-11-21 21:06:51 +00:00
Brian Anderson
ac2f379abb char: Mark the MAX constant stable 2014-11-21 12:49:51 -08:00
Brian Anderson
070e691379 core: Mark Char trait experimental 2014-11-21 12:49:51 -08:00
Brian Anderson
41fb8f77ee core: Add from_u32 to the Char trait
This is the only free function not part of the trait.
2014-11-21 12:49:51 -08:00
Alexander Light
4c36ad01e7 Add weak_count and strong_count to Rc and Arc
These functions allow you to see how many weak and strong references
there are to an `Arc`, `Rc`, or an `rc::Weak`. Due to the design of
`Arc` it is not possible to get the number of weak references of an
arbitrary `arc::Weak`. Look in `arc.rs` for a more in-depth explanation.

On `arc::Arc` and `arc::Weak` these operations are wait-free and atomic.
2014-11-21 15:42:01 -05:00
Richo Healey
68f90a2cad compiletest: namespaced enums fallout 2014-11-21 11:30:24 -08:00
Richo Healey
7191cd92c1 lldb: Clean up struct printing 2014-11-21 11:20:02 -08:00
bors
97c043b2e9 auto merge of #19114 : frewsxcv/rust/master, r=bstrie
Fixes #19010
2014-11-21 19:06:52 +00:00
Aaron Turon
af0c446d3b libs: add std::os::unix module
The new `std::os::unix` module exposes several extension traits
for extracting file descriptors from `std::io` types.
2014-11-21 10:17:13 -08:00
Aaron Turon
4156bc4417 sys: reveal std::io representation to sys module
This commit adds a `AsInner` trait to `sys_common` and provides
implementations on many `std::io` types. This is a building block for
exposing platform-specific APIs that hook into `std::io` types.
2014-11-21 10:17:13 -08:00
bors
f530aa08df auto merge of #19095 : juxiliary/rust/master, r=bstrie
Vim plugins shouldn't override user settings unless they ask!

Stops the plugin from modifying the users settings by default
instead makes them opt-in with `g:rust_recommended_style`
2014-11-21 16:56:47 +00:00
Ruud van Asseldonk
c724131a86 rustc: Change all ABI constants to all caps.
This also removes `box_field_refcnt`. It was not used anywhere.
2014-11-21 17:49:11 +01:00
Ruud van Asseldonk
b781c8b08e rustc: Unify fat pointer ABI constants.
This merges the `trt_field_*`, `fn_field_*` and `slice_elt_*` constants
into two `FAT_PTR_*` constants. This resolves the first part of #18590.
2014-11-21 17:49:11 +01:00
Joonas Javanainen
5a08e679c7 Fix std::fmt::Binary format char in docs
This small piece of documentation was missed in the format character change
in 4af3494bb0.
2014-11-21 15:12:08 +00:00
bors
9efa23e9c0 auto merge of #19042 : SimonSapin/rust/generic-utf16-encoder, r=alexcrichton
This allows encoding to UTF-16 something that is not in UTF-8, e.g. a `[char]` UTF-32 string.

This might help with servo/servo#4023
2014-11-21 14:21:48 +00:00
bors
47c1d437c9 auto merge of #18984 : sheroze1123/rust/fix17574, r=bstrie
Fix #17574
2014-11-21 11:36:45 +00:00
bors
e583c4d24b auto merge of #18908 : tbu-/rust/pr_mapinplace_fixzerosized, r=alexcrichton 2014-11-21 09:01:50 +00:00
bors
2fcbf90d68 auto merge of #16552 : jauhien/rust/fix-libdir, r=alexcrichton
Fixies #11671

This commit changes default relative libdir 'lib' to a relative libdir calculated using LIBDIR provided by --libdir configuration option. In case if no option was provided behavior does not change.
2014-11-21 06:21:48 +00:00
Alfie John
93ba558588 doc: adding example for implementations without traits 2014-11-21 04:43:07 +00:00
bors
c9f6d69642 auto merge of #18967 : aturon/rust/remove-runtime, r=alexcrichton
This PR completes the removal of the runtime system and green-threaded abstractions as part of implementing [RFC 230](https://github.com/rust-lang/rfcs/pull/230).

Specifically:

* It removes the `Runtime` trait, welding the scheduling infrastructure directly to native threads.

* It removes `libgreen` and `libnative` entirely.

* It rewrites `sync::mutex` as a trivial layer on top of native mutexes. Eventually, the two modules will be merged.

* It hides the vast majority of `std::rt`.

This completes the basic task of removing the runtime system (I/O and scheduling) and components that depend on it. 

After this lands, a follow-up PR will pull the `rustrt` crate back into `std`, turn `std::task` into `std::thread` (with API changes to go along with it), and completely cut out the remaining startup/teardown sequence. Other changes, including new [TLS](https://github.com/rust-lang/rfcs/pull/461) and synchronization are in the RFC or pre-RFC phase.

Closes #17325
Closes #18687

[breaking-change]

r? @alexcrichton
2014-11-21 03:41:45 +00:00
Aaron Turon
32c3d02780 Disable dubious pipe test 2014-11-20 17:19:25 -08:00
Aaron Turon
86992b6437 Loosen possibly bogus constraints in backtrace test 2014-11-20 17:19:24 -08:00
Aaron Turon
243bfc277e Fallout from namespaced enums 2014-11-20 17:19:24 -08:00
Aaron Turon
b3d4379042 Fallout from new termination semantics 2014-11-20 17:19:24 -08:00