Commit Graph

41439 Commits

Author SHA1 Message Date
Steve Klabnik
290da6f016 Remove the 30 minute intro
Fixes #24569.
2015-04-18 17:55:31 -04:00
bors
a16640051d Auto merge of #24560 - kwantam:apply_table_opt, r=alexcrichton
Apply optimization described in
https://github.com/rust-lang/regex/pull/73#issuecomment-93777126
to rust's copy of `unicode.py`.

This shrinks librustc_unicode's tables.rs from 479kB to 456kB,
and should improve performance slightly for related operations
(e.g., is_alphabetic(), is_xid_start(), etc).

In addition, pull in fix from @dscorbett's commit
d25c39f86568a147f9b7080c25711fb1f98f056a in regex, which
makes `load_properties()` more tolerant of whitespace
in the Unicode tables. (This fix does not result in any
changes to tables.rs, but could if the Unicode tables
change in the future.)
2015-04-18 21:30:03 +00:00
Corey Farwell
d2ed11862c Indicate keywords are code-like in Fuse::reset_fuse doc comment 2015-04-18 16:48:29 -04:00
Tamir Duberstein
a8aa4ee034 Update Windows caveats
- https://github.com/rust-lang/rust/issues/1237 is closed
- `libgcc` is now statically linked:
  https://github.com/rust-lang/rust/pull/17471
2015-04-18 13:00:40 -07:00
bors
49a94f29bb Auto merge of #24562 - Manishearth:rollup, r=Manishearth
- Successful merges: #24466, #24472, #24532, #24542, #24548
- Failed merges: #24552
2015-04-18 19:24:06 +00:00
Manish Goregaokar
88601f8d7d fix doctest (fixup #24466) 2015-04-19 00:54:42 +05:30
Manish Goregaokar
695efb53d6 Rollup merge of #24548 - graydon:reference-tidying, r=steveklabnik
This just deletes some egregious lies and obsolete terminology -- all of which I originally wrote -- from the reference. I expect the reference itself will be deleted soon enough, but I found myself gritting teeth over these bits too much to let them into a 1.0 release.
2015-04-18 23:29:58 +05:30
Manish Goregaokar
cb7a12757b Rollup merge of #24542 - michaelsproul:rollup, r=alexcrichton
I did a manual merge of all the extended error PRs as we were getting merge conflicts yesterday. I think this is preferable to merging separately as I ended up having to manually merge @nham and @GuillaumeGomez's commits.

Rollup of #24458, #24482 and #24488.

#24482 and #24488 were already re-approved, and would need to be cancelled if this is merged instead.
2015-04-18 23:29:57 +05:30
Manish Goregaokar
93d8ba2906 Rollup merge of #24532 - brson:beta, r=pnkfelix 2015-04-18 23:29:57 +05:30
Manish Goregaokar
4afd45e5b3 Rollup merge of #24472 - dotdash:23431, r=nikomatsakis
Loading from and storing to small aggregates happens by casting the
aggregate pointer to an appropriately sized integer pointer to avoid
the usage of first class aggregates which would lead to less optimized
code.

But this means that, for example, a tuple of type (i16, i16) will be
loading through an i32 pointer and because we currently don't provide
alignment information LLVM assumes that the load should use the ABI
alignment for i32 which would usually be 4 byte alignment. But the
alignment requirement for the (i16, i16) tuple will usually be just 2
bytes, so we're overestimating alignment, which invokes undefined
behaviour.

Therefore we must emit appropriate alignment information for
stores/loads through such casted pointers.

Fixes #23431
2015-04-18 23:29:57 +05:30
Manish Goregaokar
514e06d65d Rollup merge of #24466 - steveklabnik:more_more_more, r=alexcrichton
Link to the big chapter for now, and add move semantics.
2015-04-18 23:29:57 +05:30
kwantam
f14d289d71 optimize Unicode tables
Apply optimization described in
https://github.com/rust-lang/regex/pull/73#issuecomment-93777126
to rust's copy of `unicode.py`.

This shrinks librustc_unicode's tables.rs from 479kB to 456kB,
and should improve performance slightly for related operations
(e.g., is_alphabetic(), is_xid_start(), etc).

In addition, pull in fix from @dscorbett's commit
d25c39f86568a147f9b7080c25711fb1f98f056a in regex, which
makes `load_properties()` more tolerant of whitespace
in the Unicode tables. (This fix does not result in any
changes to tables.rs, but could if the Unicode tables
change in the future.)
2015-04-18 13:20:57 -04:00
Corey Farwell
68d003c9ba Utilize if..let for get_mut doc-comment examples 2015-04-18 12:45:05 -04:00
Björn Steinbrink
78745a4afe Emit correct alignment information for loads/store of small aggregates
Loading from and storing to small aggregates happens by casting the
aggregate pointer to an appropriately sized integer pointer to avoid
the usage of first class aggregates which would lead to less optimized
code.

But this means that, for example, a tuple of type (i16, i16) will be
loading through an i32 pointer and because we currently don't provide
alignment information LLVM assumes that the load should use the ABI
alignment for i32 which would usually be 4 byte alignment. But the
alignment requirement for the (i16, i16) tuple will usually be just 2
bytes, so we're overestimating alignment, which invokes undefined
behaviour.

Therefore we must emit appropriate alignment information for
stores/loads through such casted pointers.

Fixes #23431
2015-04-18 18:32:14 +02:00
Tshepang Lekhonkhobe
4665c3bbfa doc: improve/fix 'let' FAQ 2015-04-18 17:36:41 +02:00
bors
a81ce5f991 Auto merge of #24528 - tamird:valgrind-sched, r=alexcrichton
r? @brson
2015-04-18 14:38:44 +00:00
bors
fcf637b19f Auto merge of #24519 - rprichard:opt-write-args, r=alexcrichton
It's just as convenient, but it's much faster. Using write! requires an
extra call to fmt::write and a extra dynamically dispatched call to
Arguments' Display format function.
2015-04-18 12:35:07 +00:00
Florian Hahn
2a24e97c80 Return nonzero exit code if there are errors at a stop point 2015-04-18 12:23:49 +02:00
bors
ba1192835b Auto merge of #24464 - lambdaburrito:master, r=alexcrichton
resolves #24462
2015-04-18 09:12:53 +00:00
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
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