Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 3 pull requests #23861

Merged
merged 7 commits into from
Mar 30, 2015
Merged

Rollup of 3 pull requests #23861

merged 7 commits into from
Mar 30, 2015

Commits on Mar 27, 2015

  1. Configuration menu
    Copy the full SHA
    82b375b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    d77a951 View commit details
    Browse the repository at this point in the history
  3. Rollup merge of rust-lang#23625 - fhahn:issue-23620-ice-unicode-bytes…

    …tring, r=alexcrichton
    
     closes rust-lang#23620
    
    This PR patches the issue mentioned in rust-lang#23620, but there is also an ICE for invalid escape sequences in byte literals. This is due to the fact that the `scan_byte` function returns ` token::intern(\"??\") ` for invalid bytes, resulting in an ICE later on. Is there a reason for this behavior? Shouldn't `scan_byte` fail when it encounters an invalid byte?
    
    And I noticed a small inconsistency in the documentation. According to the formal byte literal definition in http://doc.rust-lang.org/reference.html#byte-and-byte-string-literals , a byte string literal contains `string_body *`, but according to the text (and the behavior of the lexer) it should not accept unicode escape sequences. Hence it should be replaced by `byte_body *`. If this is valid, I can add this fix to this PR.
    Manishearth committed Mar 27, 2015
    Configuration menu
    Copy the full SHA
    e65c6e5 View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#23712 - nikomatsakis:reflect-trait, r=FlaPer87

     This PR introduces a `Reflect` marker trait which is a supertrait of `Any`. The idea is that `Reflect` is defined for all concrete types, but is not defined for type parameters unless there is a `T:Reflect` bound. This is intended to preserve the parametricity property. This allows the `Any` interface to be stabilized without committing us to unbounded reflection that is not easily detectable by the caller.
    
    The implementation of `Reflect` relies on an experimental variant of OIBIT. This variant behaves differently for objects, since it requires that all types exposed as part of the object's *interface* are `Reflect`, but isn't concerned about other types that may be closed over. In other words, you don't have to write `Foo+Reflect` in order for `Foo: Reflect` to hold (where `Foo` is a trait).
    
    Given that `Any` is slated to stabilization and hence that we are committed to some form of reflection, the goal of this PR is to leave our options open with respect to parametricity. I see the options for full stabilization as follows (I think an RFC would be an appropriate way to confirm whichever of these three routes we take):
    
    1. We make `Reflect` a lang-item.
    2. We stabilize some version of the OIBIT variation I implemented as a general mechanism that may be appropriate for other use cases.
    3. We give up on preserving parametricity here and just have `impl<T> Reflect for T` instead. In that case, `Reflect` is a harmless but not especially useful trait going forward.
    
    cc @aturon
    cc @alexcrichton
    cc @glaebhoerl (this is more-or-less your proposal, as I understood it)
    cc @reem (this is more-or-less what we discussed on IRC at some point)
    cc @flaper87 (vaguely pertains to OIBIT)
    Manishearth committed Mar 27, 2015
    Configuration menu
    Copy the full SHA
    5b45ede View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#23740 - alexcrichton:remove-deprecated-slic…

    …ing-syntax, r=aturon
    
     This syntax has been deprecated for quite some time, and there were only a few
    remaining uses of it in the codebase anyway.
    Manishearth committed Mar 27, 2015
    Configuration menu
    Copy the full SHA
    db50084 View commit details
    Browse the repository at this point in the history

Commits on Mar 30, 2015

  1. Configuration menu
    Copy the full SHA
    d9252bd View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    3b45470 View commit details
    Browse the repository at this point in the history