Commit Graph

41571 Commits

Author SHA1 Message Date
bors
7a5754b330 Auto merge of #24428 - kwantam:deprecate_unicode_fns, r=alexcrichton
This patch
1. renames libunicode to librustc_unicode,
2. deprecates several pieces of libunicode (see below), and
3. removes references to deprecated functions from
   librustc_driver and libsyntax. This may change pretty-printed
   output from these modules in cases involving wide or combining
   characters used in filenames, identifiers, etc.

The following functions are marked deprecated:

1. char.width() and str.width():
   --> use unicode-width crate

2. str.graphemes() and str.grapheme_indices():
   --> use unicode-segmentation crate

3. str.nfd_chars(), str.nfkd_chars(), str.nfc_chars(), str.nfkc_chars(),
   char.compose(), char.decompose_canonical(), char.decompose_compatible(),
   char.canonical_combining_class():
   --> use unicode-normalization crate
2015-04-18 07:09:22 +00:00
bors
77213d1b28 Auto merge of #24209 - nikomatsakis:refactor-unification, r=nrc
I'm on a quest to slowly refactor a lot of the inference code. A first step for that is moving the "pure data structures" out so as to simplify what's left. This PR moves `snapshot_vec`, `graph`, and `unify` into their own crate (`librustc_data_structures`). They can then be unit-tested, benchmarked, etc more easily. As a benefit, I improved the performance of unification slightly on the benchmark I added vs the original code.

r? @nrc
2015-04-18 04:57:56 +00:00
Graydon Hoare
a99a8b0a92 Remove obsolete discusison of runtime, promote Linkage to chapter. 2015-04-17 20:02:55 -07:00
Graydon Hoare
744085ed1d Improve memory-model section very slightly. 2015-04-17 20:01:03 -07:00
Graydon Hoare
f5b2963103 Improve special-traits section very slightly. 2015-04-17 20:00:47 -07:00
bors
efa6a46a8e Auto merge of #24133 - kballard:add-sync-to-io-error, r=alexcrichton
This allows `io::Error` values to be stored in `Arc` properly.

Because this requires `Sync` of any value passed to `io::Error::new()`
and modifies the relevant `convert::From` impls, this is a

[breaking-change]

Fixes #24049.
2015-04-18 02:53:53 +00:00
Graydon Hoare
7f2f09f1b4 Eliminate the obsolete term 'slot'. 2015-04-17 19:52:29 -07:00
Graydon Hoare
21e2e6eec8 Clean up section on Type aliases. 2015-04-17 19:29:20 -07:00
Graydon Hoare
806d024783 Trim florid language. 2015-04-17 19:24:28 -07:00
Graydon Hoare
ca14b8121c Trim malformed sentence. 2015-04-17 19:22:19 -07:00
bors
1284be4044 Auto merge of #23985 - erickt:derive-cleanup, r=erickt
This extracts some of the minor cleanup patches from #23905.
2015-04-18 00:48:34 +00:00
Alex Crichton
8f5b5f94dc std: Add Default/IntoIterator/ToOwned to the prelude
This is an implementation of [RFC 1030][rfc] which adds these traits to the
prelude and additionally removes all inherent `into_iter` methods on collections
in favor of the trait implementation (which is now accessible by default).

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

This is technically a breaking change due to the prelude additions and removal
of inherent methods, but it is expected that essentially no code breaks in
practice.

[breaking-change]
Closes #24538
2015-04-17 16:37:30 -07:00
Guillaume Gomez
50f75f3e2a Add long diagnostics for "bind by-ref and by-move" 2015-04-18 08:45:50 +10:00
bors
b08d6cf529 Auto merge of #24500 - pnkfelix:oflo-checked-neg, r=nikomatsakis
Add conditional overflow-checking to signed negate operator.

I argue this can land independently of #24420 , because one can write the implementation of `wrapped_neg()` inline if necessary (as illustrated in two cases on this PR).

This needs to go into beta channel.
2015-04-17 22:45:10 +00:00
Nick Hamann
017bc44712 Add long diagnostics for E0015 2015-04-18 08:41:20 +10:00
Nick Hamann
22ce069c7e Add long diagnostics for E0020 2015-04-18 08:40:57 +10:00
bors
f305579e49 Auto merge of #24461 - nikomatsakis:issue-22077-unused-lifetimes, r=aturon
This makes it illegal to have unconstrained lifetimes that appear in an associated type definition. Arguably, we should prohibit all unconstrained lifetimes -- but it would break various macros. It'd be good to evaluate how large a break change it would be. But this seems like the minimal change we need to do to establish soundness, so we should land it regardless. Another variant would be to prohibit all lifetimes that appear in any impl item, not just associated types. I don't think that's necessary for soundness -- associated types are different because they can be projected -- but it would feel a bit more consistent and "obviously" safe. I'll experiment with that in the meantime.

r? @aturon 

Fixes #22077.
2015-04-17 20:38:18 +00:00
bors
3b2530c748 Auto merge of #24524 - Manishearth:rollup, r=Manishearth 2015-04-17 18:29:48 +00:00
Brian Anderson
a5e53472c7 Bump prerelease to .3 2015-04-17 10:00:37 -07:00
bors
9d2ac9b1e1 Auto merge of #24475 - arielb1:i24363-hacky-hack, r=pnkfelix
Fix #24363
2015-04-17 16:26:20 +00:00
Tamir Duberstein
1dee7b0160 Run valgrind with fair scheduling when available
Closes #3914.
2015-04-17 07:45:16 -07:00
Tamir Duberstein
cc267cefcb Clarify comment 2015-04-17 07:35:35 -07:00
Niko Matsakis
e47fb489c1 Address nits 2015-04-17 10:12:55 -04:00
Niko Matsakis
65ccffd224 Add licenses. 2015-04-17 10:12:55 -04:00
Niko Matsakis
416f388c6f Port to use the new Unify code, which has no UnifyValue trait
but is otherwise mostly the same.
2015-04-17 10:12:55 -04:00
Niko Matsakis
7ab0d1ab67 Port to using the newer graph, which offers iterators instead of the
older `each` method, but is otherwise identical.
2015-04-17 10:12:55 -04:00
Niko Matsakis
52c3462586 Use the newer snapshot_vec, which has a simplified delegate
interface since in practice no delegates had any state.
2015-04-17 10:12:55 -04:00
Niko Matsakis
966e53d8b6 Add librustc_data_structures crate 2015-04-17 10:12:53 -04:00
Niko Matsakis
5368070228 Fix some missing cases 2015-04-17 10:05:33 -04:00
Niko Matsakis
39b79285be Augment the constrainted parameter check to ensure that all regions
which get mentioned in an associated type are constrained.  Arguably we
should just require that all regions are constrained, but that is more
of a breaking change.
2015-04-17 10:05:33 -04:00
Niko Matsakis
ad3cbacd02 Rewrite constrained type params code to operate generically over
multiple kinds of parameters (regions and types, specifically)
2015-04-17 10:05:33 -04:00
Niko Matsakis
4a1f556999 Create a struct to represent early-bound regions 2015-04-17 10:05:32 -04:00
Felix S. Klock II
b8ec7e88fc unit test for checked overflow during signed negation. 2015-04-17 15:32:30 +02:00
Manish Goregaokar
c98115cefb Remove info for path (fixup #24452) 2015-04-17 19:01:33 +05:30
Manish Goregaokar
1b6bd92790 Rollup merge of #24515 - steveklabnik:gh24070, r=Gankro
Fixes #24070

or rather, fixes it even though it's already been fixed: slices are before now. But the linking is nice anyway.
2015-04-17 19:01:32 +05:30
Manish Goregaokar
27dc069234 Rollup merge of #24513 - j1n3l0:patch-1, r=alexcrichton 2015-04-17 19:01:32 +05:30
Manish Goregaokar
2688cebe4a Rollup merge of #24510 - fhartwig:broken-links, r=nikomatsakis
Fix broken links in various parts of the docs.
I also found a dead link [here](http://doc.rust-lang.org/nightly/alloc/boxed/) (the first link on the page), but the chapter of the book that it used to point at seems to be gone, and I'm not sure what should happen to that link.
2015-04-17 19:01:31 +05:30
Manish Goregaokar
6fcd852da7 Rollup merge of #24509 - steveklabnik:gh23962, r=nikomatsakis
FIxes #23962
2015-04-17 19:01:31 +05:30
Manish Goregaokar
1d26e5f277 Rollup merge of #24508 - steveklabnik:gh24228, r=alexcrichton
Fixes #24228
2015-04-17 19:01:31 +05:30
Manish Goregaokar
52db18559b Rollup merge of #24507 - steveklabnik:gh24185, r=alexcrichton
Fixes #24185
2015-04-17 19:01:31 +05:30
Manish Goregaokar
7c3975aa13 Rollup merge of #24501 - frewsxcv:patch-14, r=steveklabnik 2015-04-17 19:01:30 +05:30
Manish Goregaokar
d30094321d Rollup merge of #24499 - Munksgaard:methodcallee-debug, r=alexcrichton
This fixes #24497
2015-04-17 19:01:30 +05:30
Manish Goregaokar
32c70104d1 Rollup merge of #24498 - fhartwig:docs-fixes, r=steveklabnik 2015-04-17 19:01:30 +05:30
Manish Goregaokar
38588ecd8f Rollup merge of #24496 - aramvisser:patch-1, r=alexcrichton 2015-04-17 19:01:29 +05:30
Manish Goregaokar
89bfacc2e9 Rollup merge of #24494 - mvdnes:deterministic-sidebar, r=alexcrichton
This ensures that later when generating HTML, the JSON will be sorted aswell.
We now have a more deterministic build of sidebar-items.js

Closes #24473
2015-04-17 19:01:29 +05:30
Manish Goregaokar
28bc94a20a Rollup merge of #24493 - aethanyc:fix-stackoverflow-link, r=steveklabnik
The document does not display properly if the link id contains a space.
2015-04-17 19:01:29 +05:30
Manish Goregaokar
3b7f2ce8ee Rollup merge of #24490 - lstat:doc-typo, r=alexcrichton 2015-04-17 19:01:28 +05:30
Manish Goregaokar
e81cb172e3 Rollup merge of #23782 - mvdnes:obsolete_note, r=alexcrichton
When emmitting a note, previously it was not known if the note was for an error or a
warning. If it was for a warning, then with `-Awarnings` it should not have been print.
The `emit_for` function allows someone to specify which level should determine its visibility.

An example:
```rust
extern crate \"std\" as std2;
fn main() {}
```

When compiling with `-Awarnings`, this would previously emit `note: use an identifier not in quotes instead` (and nothing else).
With this patch, it will be completely silent as expected.
2015-04-17 19:01:28 +05:30
Manish Goregaokar
bdef7f62f5 Rollup merge of #24491 - bluss:rangefull-debug, r=huonw
Fix Debug impl for RangeFull

The Debug impl was using quotes, which was inconsistent:

    => (.., 1.., 2..3, ..4)
    (\"..\", 1.., 2..3, ..4)

Fix to use just ..
2015-04-17 19:01:28 +05:30
Manish Goregaokar
a1bb0a182c Rollup merge of #24475 - arielb1:i24363-hacky-hack, r=pnkfelix
Fix #24363
2015-04-17 19:01:28 +05:30