- 25 5月, 2014 14 次提交
-
-
由 bors 提交于
Paper over privacy issues with Deref by changing field names. Types that implement Deref can cause weird error messages due to their private fields conflicting with a field of the type they deref to, e.g., previously struct Foo { x: int } let a: Arc<Foo> = ...; println!("{}", a.x); would complain the the `x` field of `Arc` was private (since Arc has a private field called `x`) rather than just ignoring it. This patch doesn't fix that issue, but does mean one would have to write `a._ptr` to hit the same error message, which seems far less common. (This patch `_`-prefixes all private fields of `Deref`-implementing types.) cc #12808
-
由 Huon Wilson 提交于
Types that implement Deref can cause weird error messages due to their private fields conflicting with a field of the type they deref to, e.g., previously struct Foo { x: int } let a: Arc<Foo> = ...; println!("{}", a.x); would complain the the `x` field of `Arc` was private (since Arc has a private field called `x`) rather than just ignoring it. This patch doesn't fix that issue, but does mean one would have to write `a._ptr` to hit the same error message, which seems far less common. (This patch `_`-prefixes all private fields of `Deref`-implementing types.) cc #12808
-
由 bors 提交于
The compiler now tracks which attributes were actually looked at during the compilation process and warns for those that were unused. Some things of note: * The tracking is done via thread locals, as it made the implementation more straightforward. Note that this shouldn't hamper any future parallelization as each task can have its own thread local state which can be merged for the lint pass. If there are serious objections to this, I can restructure things to explicitly pass the state around. * There are a number of attributes that have to be special-cased and globally whitelisted. This happens for four reasons: * The `doc` and `automatically_derived` attributes are used by rustdoc, but not by the compiler. * The crate-level attributes `license`, `desc` and `comment` aren't currently used by anything. * Stability attributes as well as `must_use` are checked only when the tagged item is used, so we can't guarantee that the compiler's looked at them. * 12 attributes are used only in trans, which happens after the lint pass. #14300 is adding infrastructure to track lint state through trans, which this lint should also be able to use to handle the last case. For the other attributes, the right solution would probably involve a specific pass to mark uses that occur in the correct context. For example, a `doc` attribute attached to a match arm should generate a warning, but will not currently. RFC: 0002-attribute-usage
-
由 Steven Fackler 提交于
-
由 Steven Fackler 提交于
There's a fair number of attributes that have to be whitelisted since they're either looked for by rustdoc, in trans, or as needed. These can be cleaned up in the future.
-
由 Steven Fackler 提交于
This is a bit overly permissive but should be okay for now.
-
由 Steven Fackler 提交于
-
由 Steven Fackler 提交于
Enough attributes are marked to cleanly compile an empty library.
-
由 Steven Fackler 提交于
-
由 bors 提交于
Some functions implemented for the Ascii struct have the same functionality as other functions implemented for the normal chars. For consistency, I think they should have the same name, so I renamed the functions in Ascii to match the names in the Char trait. * Renamed `to_lower` to `to_lowercase` * Renamed `to_upper` to `to_uppercase` * Renamed `is_alpha` to `is_alphabetic` * Renamed `is_alnum` to `is_alphanumeric` * Renamed `is_lower` to `is_lowercase` * Renamed `is_upper` to `is_uppercase` [breaking-change]
-
由 Adolfo Ochagavía 提交于
-
由 bors 提交于
Might as well remove the duplication/`forget` call.
-
由 bors 提交于
-
由 Adolfo Ochagavía 提交于
-
- 24 5月, 2014 26 次提交
-
-
由 bors 提交于
On some systems (iOS for example) mutex is represented by opaque data structure which doesn't play well with simple data copy. Therefore mutex should be initialized from magic static value and filled by OS only when it landed RC. Initially written for iOS but since landing iOS support might require quite a lot of time I think it is better to split parts which aren't directly related to iOS and merge them in
-
由 Huon Wilson 提交于
-
由 Adolfo Ochagavía 提交于
Some functions implemented for the Ascii struct have the same functionality as other functions implemented for the normal chars. For consistency, I think they should have the same name, so I renamed the functions in Ascii to match the names in the Char trait. * Renamed `to_lower` to `to_lowercase` * Renamed `to_upper` to `to_uppercase` * Renamed `is_alpha` to `is_alphabetic` * Renamed `is_alnum` to `is_alphanumeric` * Renamed `is_lower` to `is_lowercase` * Renamed `is_upper` to `is_uppercase` [breaking-change]
-
由 bors 提交于
* All of the *_val functions have gone from #[unstable] to #[stable] * The overwrite and zeroed functions have gone from #[unstable] to #[stable] * The uninit function is now deprecated, replaced by its stable counterpart, uninitialized [breaking-change]
-
由 bors 提交于
Closes #14303.
-
由 bors 提交于
Most errors that arise in the lexer can be recovered from. This allows for more than one syntax error to be reported at a time.
-
由 bors 提交于
Only add `-Qunused-arguments` for clang.
-
由 Valerii Hiora 提交于
On some systems (iOS for example) mutex is represented by opaque data structure which doesn't play well with simple data copy. Therefore mutex should be initialized from magic static value and filled by OS only when it landed RC.
-
由 Alex Crichton 提交于
* All of the *_val functions have gone from #[unstable] to #[stable] * The overwrite and zeroed functions have gone from #[unstable] to #[stable] * The uninit function is now deprecated, replaced by its stable counterpart, uninitialized [breaking-change]
-
由 bors 提交于
We can now mark arguments and returns as `nonnull` in LLVM. It's still somewhat limited by the fact that LLVM loses this information after inlining but it might help in certain cases.
-
由 Kevin Ballard 提交于
Most errors that arise in the lexer can be recovered from. This allows for more than one syntax error to be reported at a time.
-
由 Luqman Aden 提交于
-
由 bors 提交于
Followup to https://github.com/mozilla/rust/pull/14331 and https://github.com/mozilla/rust/pull/12524
-
由 Luqman Aden 提交于
-
由 bors 提交于
This changes certain error messages about lifetimes so that they display lifetimes without an `&`. Fixes #10291.
-
由 Brian Anderson 提交于
-
由 Brian Anderson 提交于
-
由 Brian Anderson 提交于
[breaking-change]
-
由 Brian Anderson 提交于
[breaking-change]
-
由 Brian Anderson 提交于
[breaking-change]
-
由 bors 提交于
-
由 bors 提交于
-
由 Kevin Butler 提交于
Closes #14303.
-
由 bors 提交于
Fixes #14308.
-
由 Brian Anderson 提交于
-
由 bors 提交于
These have all been deprecated for awhile now, so it's likely time to start removing them.
-