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 4 pull requests #70581

Closed
wants to merge 13 commits into from
Closed

Commits on Mar 28, 2020

  1. Configuration menu
    Copy the full SHA
    840a576 View commit details
    Browse the repository at this point in the history

Commits on Mar 29, 2020

  1. Improve error messages for raw strings (rust-lang#60762)

    This diff improves error messages around raw strings in a few ways:
    - Catch extra trailing `#` in the parser. This can't be handled in the lexer because we could be in a macro that actually expects another # (see test)
    - Refactor & unify error handling in the lexer between ByteStrings and RawByteStrings
    - Detect potentially intended terminators (longest sequence of "#*" is suggested)
    rcoh committed Mar 29, 2020
    Configuration menu
    Copy the full SHA
    629e97a View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    c15f86b View commit details
    Browse the repository at this point in the history
  3. More raw string tests

    rcoh committed Mar 29, 2020
    Configuration menu
    Copy the full SHA
    82b2989 View commit details
    Browse the repository at this point in the history
  4. Cleanup match expression

    rcoh committed Mar 29, 2020
    Configuration menu
    Copy the full SHA
    bceab25 View commit details
    Browse the repository at this point in the history

Commits on Mar 30, 2020

  1. Configuration menu
    Copy the full SHA
    9f86d28 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    bc00b16 View commit details
    Browse the repository at this point in the history
  3. remove obsolete comment

    Made obsolete by b5e35b1
    tshepang committed Mar 30, 2020
    Configuration menu
    Copy the full SHA
    d6f71f0 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    20e2190 View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#69458 - Luro02:master, r=GuillaumeGomez,oll…

    …ie27
    
    improve folder name for persistent doc tests
    
    This partially fixes rust-lang#69411 by using the entire path as folder name, but I do not know how to deal with the proc-macro problem, where a doc test is forwarded to multiple generated functions, which have the same line for the doc test (origin).
    
    For example
    
    ```rust
    #[derive(ShortHand)]
    pub struct ExtXMedia {
        /// The [`MediaType`] associated with this tag.
        ///
        /// # Example
        ///
     -> /// ``` <- this line is given to `run_test`
        /// # use hls_m3u8::tags::ExtXMedia;
        /// use hls_m3u8::types::MediaType;
        ///
        /// let mut media = ExtXMedia::new(MediaType::Audio, "ag1", "english audio channel");
        ///
        /// media.set_media_type(MediaType::Video);
        ///
        /// assert_eq!(media.media_type(), MediaType::Video);
        /// ```
        ///
        /// # Note
        ///
        /// This attribute is required.
        #[shorthand(enable(copy))]
        media_type: MediaType,
    
        // the rest of the fields are omitted
    }
    ```
    
    and my proc macro generates
    
    ```rust
    #[allow(dead_code)]
    impl ExtXMedia {
        /// The [`MediaType`] associated with this tag.
        ///
        /// # Example
        ///
        /// ```
        /// # use hls_m3u8::tags::ExtXMedia;
        /// use hls_m3u8::types::MediaType;
        ///
        /// let mut media = ExtXMedia::new(MediaType::Audio, "ag1", "english audio channel");
        ///
        /// media.set_media_type(MediaType::Video);
        ///
        /// assert_eq!(media.media_type(), MediaType::Video);
        /// ```
        ///
        /// # Note
        ///
        /// This attribute is required.
        #[inline(always)]
        #[must_use]
        pub fn media_type(&self) -> MediaType {
            struct _AssertCopy
            where
                MediaType: ::std::marker::Copy;
            self.media_type
        }
        /// The [`MediaType`] associated with this tag.
        ///
        /// # Example
        ///
        /// ```
        /// # use hls_m3u8::tags::ExtXMedia;
        /// use hls_m3u8::types::MediaType;
        ///
        /// let mut media = ExtXMedia::new(MediaType::Audio, "ag1", "english audio channel");
        ///
        /// media.set_media_type(MediaType::Video);
        ///
        /// assert_eq!(media.media_type(), MediaType::Video);
        /// ```
        ///
        /// # Note
        ///
        /// This attribute is required.
        #[inline(always)]
        pub fn set_media_type<VALUE: ::std::convert::Into<MediaType>>(
            &mut self,
            value: VALUE,
        ) -> &mut Self {
            self.media_type = value.into();
            self
        }
    }
    ```
    
    rustdoc then executes both tests with the same line (the line from the example above the field -> 2 different tests have the same name). We need a way to differentiate between the two tests generated by the proc-macro, so that they do not cause threading issues.
    Centril authored Mar 30, 2020
    Configuration menu
    Copy the full SHA
    b731964 View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#70522 - rcoh:60762-raw-string-errors, r=pet…

    …rochenkov
    
    Improve error messages for raw strings (rust-lang#60762)
    
    This diff improves error messages around raw strings in a few ways:
    - Catch extra trailing `#` in the parser. This can't be handled in the lexer because we could be in a macro that actually expects another # (see test)
    - Refactor & unify error handling in the lexer between ByteStrings and RawByteStrings
    - Detect potentially intended terminators (longest sequence of "#*" is suggested)
    
    Fixes rust-lang#60762
    cc @estebank who reviewed the original (abandoned) PR for the same ticket.
    r? @Centril
    Centril authored Mar 30, 2020
    Configuration menu
    Copy the full SHA
    5bb5d11 View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#70555 - Centril:fix-70549, r=petrochenkov

    resolve, `try_resolve_as_non_binding`: use `delay_span_bug` due to parser recovery
    
    Fixes rust-lang#70549
    
    r? @petrochenkov
    Centril authored Mar 30, 2020
    Configuration menu
    Copy the full SHA
    52ddd32 View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#70561 - tshepang:obsolete-comment, r=petroc…

    …henkov
    
    remove obsolete comment
    
    Made obsolete by b5e35b1
    Centril authored Mar 30, 2020
    Configuration menu
    Copy the full SHA
    13f6f8a View commit details
    Browse the repository at this point in the history