Bumps the patch group in /src/exercises/bare-metal/rtc with 1 update:
[aarch64-rt](https://github.com/google/aarch64-rt).
Updates `aarch64-rt` from 0.2.1 to 0.2.2
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/google/aarch64-rt/blob/main/CHANGELOG.md">aarch64-rt's
changelog</a>.</em></p>
<blockquote>
<h2>0.2.2</h2>
<h3>Improvements</h3>
<ul>
<li>Added optional parameters to <code>initial_pagetable!</code> to
allow initial MAIR, TCR and SCTLR values to
be specified. The default values are exposed as constants.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="2ba1c5153b"><code>2ba1c51</code></a>
Prepare for 0.2.2 release.</li>
<li><a
href="02b0802d0a"><code>02b0802</code></a>
Merge pull request <a
href="https://redirect.github.com/google/aarch64-rt/issues/17">#17</a>
from google/pagetable</li>
<li><a
href="442899cec7"><code>442899c</code></a>
Specify MAIR in example.</li>
<li><a
href="141090a51c"><code>141090a</code></a>
Allow just MAIR to be specified.</li>
<li><a
href="5720896eee"><code>5720896</code></a>
Allow initial MAIR, TCR and SCTLR values to be specified.</li>
<li><a
href="76b1699a3d"><code>76b1699</code></a>
Bump smccc from 0.2.1 to 0.2.2 (<a
href="https://redirect.github.com/google/aarch64-rt/issues/16">#16</a>)</li>
<li>See full diff in <a
href="https://github.com/google/aarch64-rt/compare/0.2.1...0.2.2">compare
view</a></li>
</ul>
</details>
<br />
[](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
<details>
<summary>Dependabot commands and options</summary>
<br />
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore <dependency name> major version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's major version (unless you unignore this specific
dependency's major version or upgrade to it yourself)
- `@dependabot ignore <dependency name> minor version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's minor version (unless you unignore this specific
dependency's minor version or upgrade to it yourself)
- `@dependabot ignore <dependency name>` will close this group update PR
and stop Dependabot creating any more for the specific dependency
(unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore <dependency name>` will remove all of the ignore
conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will
remove the ignore condition of the specified dependency and ignore
conditions
</details>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Adds support for a `refresh-slide-list` argument when running the
command `cargo xtask web-tests`. Allows one to also specify an optional
book html directory **if** one uses the `refresh-slide-list` argument.
Fixes#2744 .
In addition to simplifying building locally (no need to set an
environment variable), this makes it possible to use the `cargo xtask
build` command in the CI and specify any output location, rather than
relying on the build.sh script.
---------
Co-authored-by: Eric Githinji <egithinji@google.com>
Given
```
#[rustfmt::skip]
fn main() {
let input = '1';
match input {
key if key.is_lowercase() => println!("Lowercase: {key}"),
'q' => println!("Quitting"),
'a' | 's' | 'w' | 'd' => println!("Moving around"),
'0'..='9' => println!("Number input"),
_ => println!("Something else"),
}
}
```
the output will be
```
Number input
```
So in practice, failing the condition does result to the other arms if
the other arms are after that (if I'm reading this correctly).
Hello, I would like to support the translation of Rust into Turkish in
order to promote it in Turkey. As I saw in the previous PRs, we need to
add our own name here, so I am opening a PR in this regard. I hope it
will have a positive outcome (I know I opened the PR with the wrong
name, I'm sorry).
These dependencies turned out not to be necessary, since depending on
the generated `com.example.birthdayservice-rust` also exports the common
binder functionality.
Adds the start of an unsafe deep dive to Comprehensive Rust.
The `unsafe` keyword is easy to type, but hard to master. When used
appropriately, it forms a useful and indeed essential part of the Rust
programming language.
By the end of this deep dive, you'll know how to work with `unsafe` code,
review others' changes that include the `unsafe` keyword, and produce
your own.
What you'll learn:
- What the terms undefined behavior, soundness, and safety mean
- Why the `unsafe` keyword exists in the Rust language
- How to write your own code using `unsafe` safely
- How to review `unsafe` code
Here is a tentative outline of a 10h (2 day) treatment:
Day 1: Using and Reviewing Unsafe
- Welcome
- Motivations: explain why the `unsafe` keyword exists
- Foundations: provide background knowledge; what is soundness? what is
undefined behavior? what is validity in respect to pointers?
- Mechanics: what a safe `unsafe` block should look like
- Representations and Interoperability: explore how data is laid out in
memory and how that can be sent across the wire and/or stored on disk.
- Reviewing unsafe
- Patterns for safer unsafe: Encapsulating unsafe code in safe-to-use
abstractions, such as marking a type's constructor as `unsafe` so that
invariants only need to be enforced once by the programmer.
Day 2: Deploying Unsafe to Build Abstractions
- Welcome
- Validity in detail: A refresher. Emphasis on the details of the
invariants that are being upheld by a “typical” unsafe block, such as
aliasing, alignment, data validity, padding.
- Concurrency and thread safety: understanding `Send` and `Sync`,
knowing how to implement them on a user-defined type
- Case study: Small string optimization
- Case study: Zero-copy parsing
- Review
---------
Co-authored-by: Dmitri Gribenko <gribozavr@gmail.com>
This has a lot of detailed and high-quality API advice.
I think it's particularly useful to developers experienced in other
languages, who may default to carrying over design idioms where Rust has
better options.
This PR introduces:
- A new section for the "Idiomatic Rust" learning module
- (The beginning of) the section on newtype patterns
---------
Co-authored-by: Dmitri Gribenko <gribozavr@gmail.com>
Now that there is a `rustup` package, we can take away the scary
language and ask people to install that. This has the advantage that
people get a trusted tool to download the latest Rust compiler.
The point at which the generics segment will be covered has changed
multiple times. After the last change, the 'logger trait' section was
not updated to reflect when it will now be covered. To keep it more
general, I suggest not specifying when it will be covered.
Having taught the course again since the change to use safe-mmio, it
seems worth keeping this as an intermediate step rather than jumping
straight from pointer arithmetic to safe-mmio's abstractions.
A lot of stuff in the standard library makes use of closures, so I think
it makes sense to cover those first so that we can more easily reference
libstd functions like `map` and `filter`.
I've tried removing this trait bound thinking it's unnecessary only to
then be surprised that it breaks type inference. I think that's worth
calling out to students, so I think a speaker note here would be
appropriate.
I think doing the call to `Duration::try_from_secs_f32` in the pattern
match is a bit verbose since the function name is so long. I usually
split this off into a separate variable so that it's easier to see the
pattern match syntax.
According to the error I got from trying out-of-bound index, array
accesses seem to be checked at compile time.
```
Compiling playground v0.0.1 (/playground)
error: this operation will panic at runtime
--> src/main.rs:3:5
|
3 | a[7] = 0;
| ^^^^ index out of bounds: the length is 5 but the index is 7
|
= note: `#[deny(unconditional_panic)]` on by default
error: could not compile `playground` (bin "playground") due to 1 previous error
```