In a workspace, I have and do the following:
$ cat rust-toolchain
[toolchain]
channel = "nightly-2021-01-24"
components = [ "rustfmt", "rust-std", "clippy" ]
targets = [ "wasm32-unknown-unknown", "x86_64-unknown-linux-gnu" ]
$ cargo fmt
error: invalid channel name '[toolchain]' in '.../rust-toolchain'
error: caused by: invalid toolchain name: '[toolchain]'
I'm not sure what I missed.