Commit Graph

41560 Commits

Author SHA1 Message Date
bors
c64feb6341 Auto merge of #24592 - P1start:style-lints-changes, r=alexcrichton
Passing a non-snake-case name to `#![crate_name]` or `--crate-name` will now yield a warning from the `non_snake_case` lint.
2015-04-19 21:36:14 +00:00
Piotr Czarnecki
e5e343aeb7 Finished unicode support in the model lexer.
Completed XID_Start and XID_Continue rules
2015-04-19 23:05:32 +02:00
Florian Hahn
be437132b8 Add proper XID_Start and XID_Continue rules and use CharPos for span comparison, closes #15679 2015-04-19 23:02:10 +02:00
bors
da355efc1c Auto merge of #24517 - erickt:str, r=alexcrichton
This implementation is currently about 3-4 times faster than using the `.to_string()` based approach.

I would also suggest we deprecate `String::from_str` since it's redundant with the stable `String::from` method, but I'll leave that for a future PR.
2015-04-19 19:32:45 +00:00
Erick Tryzelaar
f055054eab collections: Move optimized String::from_str to String::from
This implementation is currently about 3-4 times faster than using
the `.to_string()` based approach.
2015-04-19 10:59:06 -07:00
bors
c6b8d96abd Auto merge of #24526 - klutzy:getrandom-fix, r=alexcrichton
Fixes #21538.
2015-04-19 17:28:27 +00:00
Corey Farwell
aaafb96abd Fix typos in code comments 2015-04-19 12:18:51 -04:00
bors
ddf25c890d Auto merge of #24572 - steveklabnik:gh24569, r=brson
Fixes #24569.

Should wait until https://github.com/rust-lang/rust-www/pull/114 is merged.
2015-04-19 15:24:19 +00:00
bors
be41e98067 Auto merge of #24567 - tamird:windows-caviats, r=steveklabnik
- 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-19 13:20:24 +00:00
bors
d86b6f67bc Auto merge of #24559 - frewsxcv:get-mut-if-let, r=steveklabnik
None
2015-04-19 11:16:45 +00:00
York Xiang
adc93ceac9 rustdoc: don't inject "extern crate std;" 2015-04-19 18:10:45 +08:00
P1start
c163f89310 Lint non-snake-case crate names
Passing a non-snake-case name to #![crate_name] or --crate-name will now yield a
warning from the `non_snake_case` lint.
2015-04-19 20:31:18 +12:00
klutzy
4d80a82381 std::rand::os: Fix race condition of atomics
Fixes #21538.
2015-04-19 16:56:35 +09:00
bors
14d9d1c1cf Auto merge of #24552 - meqif:explain, r=alexcrichton
cc #24407
2015-04-19 07:51:27 +00:00
Richo Healey
4cf9e2db5e test: Add an assertion to the #16745 testcase 2015-04-19 00:25:13 -07:00
bors
049de3fe7f Auto merge of #24555 - frewsxcv:patch-14, r=steveklabnik 2015-04-19 05:46:47 +00:00
bors
bd968a1d65 Auto merge of #24554 - tshepang:let-faq, r=steveklabnik 2015-04-19 03:42:59 +00:00
Richo Healey
57fdeecd91 test: Add testcase for #16745 2015-04-18 17:41:18 -07:00
Ricardo Martins
5c7a0ba06e Add long diagnostics for E0133. 2015-04-19 00:36:59 +01:00
bors
00978a9879 Auto merge of #24383 - avdi:patch-1, r=steveklabnik
"Dynamically typed" didn't seem like a relevant distinction; there are statically-compiled dynamically-typed languages. Another term that might work here (despite being notoriously vague) is "scripting languages".
2015-04-18 23:35:50 +00:00
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