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

Use more specific panic message for &str slicing errors #38066

Merged
merged 1 commit into from
Jan 4, 2017

Commits on Nov 30, 2016

  1. Use more specific panic message for &str slicing errors

    Separate out of bounds errors from character boundary errors, and print
    more details for character boundary errors.
    
    Example:
    
        &"abcαβγ"[..4]
    
        thread 'str::test_slice_fail_boundary_1' panicked at 'byte index 4 is not
        a char boundary; it is inside `α` (bytes 3..5) of `abcαβγ`'
    bluss committed Nov 30, 2016
    Configuration menu
    Copy the full SHA
    d83fff3 View commit details
    Browse the repository at this point in the history