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

Fixed the error message of invalid array element access in ch03.2 #2446

Conversation

Amjad50
Copy link
Contributor

@Amjad50 Amjad50 commented Sep 2, 2020

fixes #2417

@Amjad50 Amjad50 force-pushed the ch3.2-fix-invalid-array-element-access branch from ae03f2d to 09ea67e Compare September 2, 2020 03:51
Copy link
Member

@steveklabnik steveklabnik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@steveklabnik steveklabnik merged commit cb28dee into rust-lang:master Sep 9, 2020
@Lonami
Copy link

Lonami commented Sep 9, 2020

This is still wrong. Just above the code the paragraph reads (emphasis mine):

What happens if you try to access an element of an array that is past the end
of the array? Say you change the example to the following code, which will
compile but exit with an error when it runs

And below says:

The compilation didn’t produce any errors, but the program resulted in a
runtime error and didn’t exit successfully.

Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request Sep 16, 2020
Update books

## nomicon

1 commits in 25854752549d44d76fbd7650e17cb4f167a0b8fb..6e57e64501f61873ab80cb78a07180a22751a5d6
2020-08-19 16:41:48 -0400 to 2020-09-14 11:40:23 -0400
- Fix API change to alloc::Global::grow. (rust-lang/nomicon#236)

## reference

3 commits in 25391dba46262f882fa846beefaff54a966a8fa5..56a13c082ee90736c08d6abdcd90462517b703d3
2020-09-02 07:22:55 -0700 to 2020-09-14 23:20:16 -0700
- Update the description of staticlib (rust-lang/reference#884)
- Rust 1.46 now allows more features in const fn (rust-lang/reference#883)
- Document the enum changes in RFC 2195 (rust-lang/reference#879)

## book

1 commits in e5ed97128302d5fa45dbac0e64426bc7649a558c..cb28dee95e5e50b793e6ba9291c5d1568d3ad72e
2020-08-31 12:53:40 -0500 to 2020-09-09 10:06:00 -0500
- Fixed the error message of invalid array element access in ch03.2 (rust-lang/book#2446)
tmandry added a commit to tmandry/rust that referenced this pull request Sep 16, 2020
Update books

## nomicon

1 commits in 25854752549d44d76fbd7650e17cb4f167a0b8fb..6e57e64501f61873ab80cb78a07180a22751a5d6
2020-08-19 16:41:48 -0400 to 2020-09-14 11:40:23 -0400
- Fix API change to alloc::Global::grow. (rust-lang/nomicon#236)

## reference

3 commits in 25391dba46262f882fa846beefaff54a966a8fa5..56a13c082ee90736c08d6abdcd90462517b703d3
2020-09-02 07:22:55 -0700 to 2020-09-14 23:20:16 -0700
- Update the description of staticlib (rust-lang/reference#884)
- Rust 1.46 now allows more features in const fn (rust-lang/reference#883)
- Document the enum changes in RFC 2195 (rust-lang/reference#879)

## book

1 commits in e5ed97128302d5fa45dbac0e64426bc7649a558c..cb28dee95e5e50b793e6ba9291c5d1568d3ad72e
2020-08-31 12:53:40 -0500 to 2020-09-09 10:06:00 -0500
- Fixed the error message of invalid array element access in ch03.2 (rust-lang/book#2446)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Chapter 3.2: Example "Invalid Array Element Access" is incorrect
3 participants